Can you detail your full specs of your current machine? you should be able to handle those tasks. Do you have a dedicated graphics card? SSD?
Have you checked activity monitor to see what the biggest culprit is?
[I now have M1 max, 64gb 14 inch - and don't have any issues. But previously I had Intel i7 mac, 13inch, 16gb ram - no dedicated graphics card and I never had issues with development, i upgraded for video editing]
That is a very capable machine and should not be having issues. I suggest trying some of the tips others have suggested here before purchasing a new machine.
1. Remove the bottom panel and clean the fans. Here is a guide to remove the lower panel. Then take a look at the small gap between the fans and the heatsink fins. I suspect there is dust clogging the heatsink fins.
Have you checked activity monitor to see what the biggest culprit is?
[I now have M1 max, 64gb 14 inch - and don't have any issues. But previously I had Intel i7 mac, 13inch, 16gb ram - no dedicated graphics card and I never had issues with development, i upgraded for video editing]