Yes! What you likely have currently is a Fusion Drive, this config uses both drive connections. You will need to replace both drives and then depending on your needs put in fresh drives either just one or two (PCIe/NVMe or SATA)
But before you do that you need to fully backup your stuff, create a bootable OS installer USB thumb drive with the current or newer macOS you are planning on using (don’t exceed what is supported).
Now a warning - Please don’t install an M.2 SSD while some have achieved that the dependability has proven not to be stable. Stick with either a real Apple SSD or OWC pin compatible Aura SSD.
Then use your created OS installer drive to prep your drive/s as the internet recovery option won’t offer you the correct version if you are running anything newer than Sierra which is the last version that uses HFS+ volumes, today Apple uses APFS.
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
1