Are you sure X370 boards can run 5xxx Ryzen chips? I believe all of them top out at 3xxx series Ryzen. Still, that's a great run and much better than Intel has done for consumers.
IIRC, there were no motherboards at that time shipping with a large enough flash ROM to hold the microcode, etc. necessary to support every generation of CPU on the AM4 socket, so in practice supporting the Ryzen 5xxx processors would require a motherboard firmware update that removes support from some older processors—possibly the one you're using to prepare for the CPU upgrade. AMD decided that would be a support nightmare and instead opted to make CPU support somewhat loosely tied to chipset generation (beta BIOS versions excepted).