I frequently do enormous panoramic stitches of 20+ images using 45 to 50 megapixel cameras in Photoshop, and which usually result in approximately 400 megapixel final images.
I have a 16" MacBook Pro M1 Max with 64GB of RAM. My RAM pressure is usually around 75-80%.
If you're going to be primarily working in Photoshop, I honestly wouldn't get anything less than 32GB of RAM at this stage. If you're in a position to upgrade to 64GB of RAM, I would.