https://www.msi.com/Motherboard/support/Z270-GAMING-M5
The latest bios was indeed 2018-07-04 sounds like it's now a discontinued model out of production. Wonder what they replaced it with.
Can still check memory compatibility against the qvl if you supply the full part number of the dimms you're using.
https://www.msi.com/Motherboard/support/Z270-GAMING-M5#support-cpu
Some say the qvl is only a guide not to be taken too literally, is so far as that you may not need to precisely match the dimms you have, but it's a place to start if you are experiencing problems.
Running memtest throwing up errors could mean either a faulty dimm(s) or simply incompatible ones. How can you know really what works unless you have some experience of builds with memory that is known to work.
You can also check Userbenchmark.com for reference they have thousands of builds with brands of memory that were used with
your board. It's another way of cross referencing memory compatibility but you'll have to browse manually rather than quick search it. It may or may not be qvl, may or may not be compatible or may simply have an error.
Otherwise the problem is somewhere in the fire triangle of board, cpu, mem. Sata cables seem ok, that leaves gpu as well mebbe you can switch it for something else, windows stalling on boot could be failing to load the gpu driver.