How do I make the stuff in my game matching the display

Hello. I made a game and tested it on 2 different devices. I noticed that the looks in my game are different. The text doesn’t match what I wanted etc.
How do I make a game where the stuff inside it matches the display no matter which width or height. Here are two examples.