The people at Microsoft Support don't know anything; getting support from them will get you nowhere. It's not surprising that they issued you a replacement when they couldn't figure it out. The same thing happened to me with a Surface Pro 3 a couple years ago. I had lots of issues with the touch screen, so I contacted Microsoft Support and they shipped me a new one... then the new one had exactly the same problem. I eventually figured out (on my own) that the touch screen problem I was having was caused by using a type cover for a Surface Pro 5 on a Surface Pro 3 (even though Microsoft said they are compatible).
The bluescreens on your new Surface Laptop are probably because they didn't load the image properly on your replacement device. It was probably a used device that somebody returned.
I would recommend to just completely reinstall Windows on it... but not by going into the settings app and doing a factory reset... if the image was messed up then you might just reinstall a messed up OS by doing that, which won't solve anything.
Download the media creation tool from this link:
https://www.microsoft.com/en-ca/software-download/windows10
(Under "Create Windows 10 installation media", click the "Download tool now" button).
Then create the media on a spare USB stick.
Stick the USB stick in the Surface Laptop and boot from it. This will install Windows 10 from scratch. As a warning, this will erase everything you have on your computer. Before you erase your computer though, take note of what Edition of Windows 10 you have on your laptop (Home, Professional, etc); it will ask for it when you're installing Windows again.
When selecting a drive to install Windows on, delete all the partitions first, and select Windows to install on the unallocated space.
When it asks for a product key during the install, just click "I don't have a product key." As long as you selected the right edition of Windows 10, it will just read the product key from the BIOS when it's finished installing.