Yes, the SSD can be replaced, but I would advise against a 512 GB solution, which has a shorter lifespan and 512 GB are generally more expensive in relation to a 1 GB SSD. This one is very good and has a total bytes written life of 2550 terabytes. It is also one of the fastest:
Seagate FireCuda 530 (1000 GB, M.2 2280)This RAM would be suitable for expansion to a maximum of 64 GB:
Crucial Laptop Memory (2 x 32GB, 3200 MHz, DDR4-RAM, SO-DIMM)For 32 GB, I would choose this one, replacing the installed RAM and SSD also has the advantage that you can simply restore the original state in the event of a warranty claim and you don't have to risk giving away your data.
Crucial Laptop Memory (2 x 16GB, 3200 MHz, DDR4-RAM, SO-DIMM)RAM should always be installed in pairs, upgrading the existing RAM is possible in principle, but there may be compatibility problems if you mix RAM modules.