Ah, Windows 10 Repair. You could check your UEFI settings to confirm they are appropriate to your system, refer to manual, if anything not correct, adjust, try boot. If there is nothing to adjust, move on to 'Automatic Repair' and give it a try.
To review: new system with current components boots but will not fully install Windows 10 even in SAFE mode. When memtest is booted outside of Windows from a bootable CD/flash drive, it runs well, says RAM is ok, yet mysteriously crashes. I think we are looking at either a flakey motherboard or some kind of minor assembly issue. At this point, I would take it all apart, inspect carefully and then do a progressive benchtop build (basics to start, getting error code beeps for 'no ram', then 'no video' - solving each error code by installing the missing component and having it show as 'good' when the error code goes away). This would include removing and reinstalling heatsink and CPU - so you need thermal compound and some alcohol to clean the old off.
Pay close attention to wiring plugged into headers at bottom of motherboard - manual is essential for this. Pay close attention to secondary power connections to motherboard - the 4 pin stuff. Confirm heatsink is clearly
not touching RAM or other components.
Finally, when putting motherboard into case, be careful with I/O shield - one of the grounding fingers can short inside a socket on the MB.
Here is a video on a benchtop rebuild: