3d game on the phone

Help how to make sure that when you open the game on the phone, the resolution automatically adjusts to the screen and it looks normal.
In horizontal mode, everything looks as it should, but if the game is loaded so that it is displayed vertically, then distortions occur, the camera is far away, and if you make it closer, the character stretches and looks like a frog