Adobe recommends at least 16 GB of RAM for each of those applications. RAM is non-expandable after purchase on Mac notebooks, so it is important to get enough of it, even if that means custom-ordering.
You can get 8, 16, or 24 GB of RAM on a Mac notebook with a base M2 or M3 chip. I believe that MacBook Pros with M3 Pro chips come with at least 18 GB of RAM, and that MacBook Pros with M3 Max chips come with at least 36 GB of RAM.
It seems unlikely that you would need more than 36 GB of RAM – but if you did, MacBook Pros with M3 Max chips can be ordered with up to 128 GB of RAM.