If your laptop had Big Sur installed then the laptop should be at the most recent firmware. The firmware is only able to be updated when upgrading macOS to a new version or with any firmware updates included with any macOS patches/updates. While there may be other methods they are not approved by Apple who will remove any posts discussing it (plus it is risky & beyond the abilities of the average user).
If the laptop worked fine after you had upgraded to Big Sur and the issue only started after you tried installing a third party SSD it would imply the firmware is Ok and that something happened during the attempted SSD upgrade. Possibilities are the new adapter or SSD damaged the Logic Board, or you accidentally "zapped" the Logic Board or both SSDs with static electricity, or accidentally damaged a very small component on the Logic Board, or you did not unplug the charger & battery before performing the upgrade there by damaging the Logic Board and SSDs. There are a lot of ways something unintentionally occurred and it is always a possibility no matter how careful a person is.
Did you receive that diagnostic error code with the original Apple SSD installed? It is known that the Apple Diagnostics will report a failure when a third party SSD (or other third party parts) are installed.
Did you try using a different brand of USB stick for your macOS installer? Macs can be very picky about the USB sticks used for booting. You can even use a standard USB hard drive/SSD for the macOS USB installer.
Install your new third party SSD and try installing Ubuntu or Linux Mint on the laptop. This may give us a better idea of the problem. Sometimes Linux will work where macOS fails. If Linux is unable to boot or install on this laptop, then you have some sort of hardware issue.
Since you are using a standard M.2 SSD you can test the SSD in a standard PC or use an external USB NVMe enclosure to make sure the new SSD is functional which will narrow down the problem to the SSD adapter or the Logic Board. Of course this is a risky test if the SSD is bad because it may damage another motherboard or the enclosure.
You can test the original Apple SSD by installing it into an OWC Envoy Pro Enclosure and trying to access the contents using another Mac.
If the Logic Board or firmware is bad, then your only options are to have Apple replace the Logic Board (expensive), or to find a repair technician that knows how to repair an Apple Logic Board and/or firmware, or you recycle this system and buy another computer. It is also possible that the Big Sur firmware has a bug which is causing your problems (the Big Sur installer has been reported to have damaged some 2013 & 2014 MBPros during the install process).