It is risky removing the Apple branded internal SSD from the iMac because the next major release of macOS may not install without it. Beginning with macOS 12.x Monterey, the macOS installer refuses to update the system firmware unless an Apple OEM SSD is installed internally. Once the installer updates the system firmware, then it is possible to install Monterey with just a third party internal SSD installed. I haven't heard anything one way or the other in regards to macOS 13.x Ventura, but you never know what the next OS will do. For some Macs, this may be just a small inconvenience to swap out drives temporarily, but for an iMac it is a major undertaking.
If you go for an M.2 SSD, then I highly recommend using the Sintech SSD adapter. From reading these forums for years, this seems to be the adapter which is most compatible & reliable. As for SSDs, not all SSDs are compatible with all computers. OWC is one of the few which is made specifically for a Mac and comes with manufacturer support when used with a Mac.
Using an external USB3.1+ SSD is also an option (will be just as fast or faster than the original Apple SSD depending on the SSD purchased) and many contributors on these forums would say it is the better option. Choice is ultimately yours.
Edit: Getting a USB3 SSD with UASP support is recommended for best performance. Each device in the USB chain must also support UASP as well.
https://www.startech.com/en-us/blog/all-you-need-to-know-about-uasp