Formatting in different views- new to coding

So I am brand new to coding and I’m working on my first portfolio project. I have a 27" iMac. I usually don’t use a fullscreen view when I’m working on it and this is the same when I’m coding. I have found that when I code, the page looks good to me at the time, but then when I go to full screen mode, my proportions change and the formatting looks messed up. Am I doing something wrong? I can provide screenshot examples if you want.

Figuring out how to make a page look good (and work well) on screens of different dimensions is one of the big challenges of web development. This is something that we call “responsive design”.