Is it worth the upgrade ?

So i have the Hp pavilion gaming 15 in its most powerful configuration with *Ryzen 7 5800H *16 Gb DDR4 *Rtx3050 *512Gb Nvme M2 For reference i am a cs major and my main areas of concern is Training small neural networks, running some robot simulations and casual Gaming. Its not like my current setup cant do the above but i wish i had some more power sometimes. The real question is: Would it be worth spending 1500$ plus for something with a Ryzen 9 and rtx4060/70 or the upgrade wouldn't be worth the cost