Fide, the organization that makes the rules, has givent the rule that now we can castle vertically
Castling Vertically? Real Rule? If so, how did/does it work?

But how would you do vertical castling. And what if a pawn promotes to a rook on some other file and rank, but the king hasn’t move, the king can still castle according to these rules?

But how would you do vertical castling. And what if a pawn promotes to a rook on some other file and rank, but the king hasn’t move, the king can still castle according to these rules?
You wouldn't. Castling is only allowed on the first rank between the king and rook and neither having already moved. A promoted pawn to a rook on the 8th rank wouldn't be the first rank.
There are probably some chess variants where castling vertically is allowed though. But it's something you should probably never try in a regular tournament. Your opponent will probably call the arbitrator over and you'll be famous throughout the tournament venue for a couple days.
https://youtu.be/n3mTsTeQNm8