See all the technical specifications for the 14- and 16-inch MacBook Pro with the M5, M5 Pro, and M5 Max chips.
www.apple.com
I purchased an Apple refurbed 14" M4 base machine, with 32GB of Ram, and 2TB of Disk for $2,210 (15% off), back when we thought tariffs were going to double the prices of computers, instead of memory and storage.
Also to consider is the connectivity. TB5 on the M5 pro chip gives you access to say more connectivity (multiple 120hz 5K screens for example) and thus higher speeds for external drives etc. May not be a consideration though.
24GB will be ample for your tasks. 32GB even better but likely to not notice this aspect unless loading up with lots of AI models/ containers etc.
M5 Pro chip also has more cores (15 on base vs 10 on the non pro M5 chip).
Do you really need the 2TB ? 1TB models probably more than enough ?