Responsive design/squzing elements

Hi,
I want to make objects adjust to the size of the page, not just shrink. I’m watching a course that came out 2 years ago, and there the person uses vertical padding to achieve this result, but now there is no such function.
I will be very grateful if someone helps me!