If it doesn't boot with those slots populated then you have other problems. ALL consumer motherboards with dual channel memory architectures use the A2 and B2 slots for the primary two DIMM population. Try it again.
Put them in the A2 and B2 slots, THEN reset the BIOS as follows.
Power off the unit, switch the PSU off and unplug the PSU cord from either the wall or the power supply.
Remove the motherboard CMOS battery for five minutes. During that five minutes, press the power button on the case for 30 seconds. After the five minutes is up, reinstall the CMOS battery making sure to insert it with the correct side up just as it came out.
Now, plug the power supply cable back in, switch the PSU back on and power up the system. It should display the POST screen and the options to enter CMOS/BIOS setup. Enter the bios setup program and reconfigure the boot settings for either the Windows boot manager or for legacy systems, the drive your OS is installed on if necessary.
Save settings and exit. If the system will POST and boot then you can move forward from there including going back into the bios and configuring any other custom settings you may need to configure such as Memory XMP profile settings, custom fan profile settings or other specific settings you may have previously had configured that were wiped out by resetting the CMOS.
And you STILL have not actually SAID whether or not you have updated to the latest BIOS or are on an older version.
It is CRITICALLY important on Ryzen for memory compatibility purposes that you have the most recent BIOS version installed.
If your BIOS is older than version 2008 I would update to AT LEAST that version. The latest version would be better. Also, make sure you have installed the AMD chipset version drivers 18.50.16 or newer. That won't affect POST, but it will affect Windows environment if you update to a BIOS version newer than 2008.