Opening the iMac, contrary to what apple wants you to believe, doesn't void the warranty.Sorry, but why should OP buy a brand new iMac just to open it? If he/she is a tinkerer, yes, but I personally wouldn‘t mess with the warranty of a brand new all-in-one.
By "some guy" I mean an apple certified technician, thus avoiding warranty voiding.
Finally, the reason you want to do that at all is because a 3rd party nvme drive would be vastly cheaper than what apple offers, and a computer without an nvme SSD is a sad thing.