Ok, so. To try and explain, let us first establish. The universe is 3D, there is no celling, and things exist in space, in every direction. Just like how no matter where you stand on earth you can see stars in the night sky, and it’s not just one line of stars across the sky. Now, the way our solar system works is much like the models you have seen. The planets orbit the sun, seemingly in the same plane, except Pluto, which is slightly ajar, and comets (probably other things too). Not all solar systems are “flat” like ours, but it’s not uncommon. The planets orbit our sun in this 2D fashion because of how our solar system was created. It was originally a big sphere of gas, that startet spinning so fast it turned into a disk. For a visual and professional explanation of why our planets orbit in the same plane, you should watch this video by Scishow: https://youtu.be/G_Mf7pipKu0
For some more general explanation of our solar system, Kurtzgesagt has made a lovely video too: https://youtu.be/KsF_hdjWJjo
Both of these channels make great space content amongst other things. All this being said, things like orbits aren’t circular, but ellipses. See Kepler’s Laws for more on that. Most galaxies are also “flat” in the same sense as our solar system, including the Milky way. For further reading and understanding of the way space looks and works I’d recommend looking for how the universe started and expanded from the singularity.
Lastly, please know that space is very hard to visualize, in no small part because it’s so gosh darned empty. Of course understanding something is hard when your perspective doesn’t give you a chance to look at it properly. Plus physics and our world as we know it, gets super funky weird when we scale things up or down by a trillion fucktonnes anyway. (Looking at you quantum physics, and triangles with more than 180 degrees).