How do I make the size of the elements of my app to adjust to different types of devices?

Hi, I am making an app but when I try my app on different devices other than phones, like tablets or Ipads, the size of the elements mess up and they get out of place, is there any way that the size of my elements can adjust to the size of the screen of any device and the positions and proportions of the elements don’t change?