That feature is called "Reachability".
It’s designed to make it easier to reach the top of the screen on larger iPhones like your iPhone 12 Pro Max. When enabled, you can swipe down on the bottom edge of the screen (just above the Home bar) and the entire screen shifts downward, making the top part more accessible.
You can enable or disable it in Settings → Accessibility → Touch → Reachability.
Reachability works on the Home screen too! If you swipe down on the bottom edge of the screen, the entire Home screen shifts down — including the top row of apps — so you can easily tap them without stretching your fingers.
It also works in most apps and system menus, making it super handy on bigger iPhones like your 12 Pro Max.
See the pic below

Reachability was first introduced with the iPhone 6 and iPhone 6 Plus in iOS 8 (2014)—the first iPhones with larger screens. Since then, it has remained a core accessibility feature for all large-screen iPhones.
Originally, it worked by double-tapping (not pressing) the Home button on older models with Touch ID. When Apple removed the Home button (starting with iPhone X), the gesture changed to swiping down on the bottom edge of the screen.
It’s still available today in iOS 18 and works the same way on modern iPhones.