I agree with Laszlo - TwinMotion uses the GPU exclusively, so extra cores won't do anything for you. The GPU upgrade is the least you should do.
For the RAM upgrade - I would not purchase from Apple. I've always upgraded my Mac memory with 3rd party memory (most Macs have soldered-in memory - but the 27" iMacs / iMac Pro and the Mac Pros have always had user-accessible slots). The back of the iMac has a small cover that pops off exposing the sockets to just plug in the new memory.
Since your screenshot shows dollars, I assume your in North America. For 10 years, I've used memory from OWC / macsales.com without any issues in multiple machines. Assuming that this iMac has 2 sticks of 16 to give you the 32 GB ... you just need two more sticks to bring it to 64 GB. Current price on their web site is $150 ... vs the $400 from Apple. (If they've put 4 8GB sticks in the iMac at the factory, then you'd need to replace them all with 16 GB sticks... which is $299 vs $400.)
Since you can do the memory yourself, don't even bother until you find that the 32 GB is an issue - although if you only need the 2 sticks for $150, that's kind of a no-brainer. (Open Activity Monitor and look at the memory pressure while running your largest model.)
One of the forum moderators • AC 26 USA and earlier • macOS Ventura 13.2.1, iMac Pro 10-Core, Radeon Pro Vega 64