The CPU fan must come on as soon as the CPU gets power otherwise it will overheat within seconds and turn off to prevent damage. Other hardware like the GPU fan might start up at first when you power up but later on turn off when it boots into Windows as an example.
It is a good idea to connect the CPU fan directly to a Motherboard case fan port that you know is working or if possible directly from the PSU. If the fan doesn't turn on when you first power up, than you most likely have a defective CPU cooler. In which case you should open a AMD WARRANTY REQUEST to get a new Wraith CPU Cooler. If it starts working than it could be the Motherboard's CPU Power port is defective or you may have it connected to the wrong Power port.
Make sure you have the CPU Cooler Fan cable connected to the proper Motherboard CPU Power port on the Motherboard.
In case you need to open a AMD WARRANTY REQUEST you can do it online from here: AMD Warranty Request Form | AMD
Note: this happened to me once. When I replaced my original stock CPU Cooler with a stronger Stock CPU Cooler the fan didn't turn on when I applied power. Never reached the BIOS screen because the CPU instantly overheated and shut off. Once I found out the problem, the CPU Fan started as soon as the computer got power and it booted up into Windows without any issues.
EDIT: Make sure you have the correct BIOS/UEFI installed. If you have the wrong BIOS/UEFI installed the computer will never boot up. I would suggest to install the latest BIOS/UEFI since you have such a new Ryzen CPU. For your Ryzen 7 2700X you should have BIOS/UEFI version "7B79v12" installed: Support For X470 GAMING PRO | Motherboard - The world leader in motherboard design | MSI Global The lastest BIOS/UEFI for your Motherboard is "7B79v15".
Also make sure the RAM MEMORY you have installed is listed on the Motherboard's QVL List. Ryzen are pretty sensitive to the type of RAM Memory installed.