I would do the easy first, then the difficult…
Memory, then hard drive, then blade drive…
OEM memory is listed as 8 gigabytes, with 128 possible, two slots open.
You can add two 16 or 32 gigabyte chips, giving you 40 or 72…
Look at Other World Computing for chips.
Second is internal hard drive. While this requires opening the iMac, the drive is pretty accessible…
The question is, SSD or platter?
A 4 terabyte Western Digital Black is about the same cost as a 1 terabyte Samsung 870 EVO.
Look on NewEgg for good prices.
Use the Newer 2.5 to 3.5 adapter from Other World with the SSD…
Last is a blade. Major disassembly…. Look on Other World for a blade. I would get a small one, then load my Operating System on it, and programs on the Internal hard drive…