It depends on how long you're wiling to wait. Right now, 2 months after AMD released the Ryzen 3000, it's only possible to have reasonable confidence that your system will work out of the box with an X570 motherboard. The promised backward compatibility with older chipsets has yet to be fully realized.
Some B450 and X470 boards are currently shipping with a compatible BIOS. Unfortunately, the only way to be sure of getting one of them is to buy a motherboard from a brick-and-mortar shop and inspect the box before you pay for it. A compatible motherboard will have a "Ryzen 3000 ready" sticker on the box. Or perhaps the store has upgraded the BIOS of older stock, or they can do that for you. But if you don't have a brick-and-mortar shop nearby, you can roll the dice and order from an online merchant. What you get may or may not be compatible.
The other options are to have a local computer repair shop upgrade the BIOS. But if you can find one that can do that, the total cost (board plus upgrade charge) approaches or exceeds the cost of a low-end X570 motherboard. MSI has motherboards that can flash the BIOS without a CPU. But numerous forum posts suggest that's also a crapshoot with the current BIOS. Some people have no problems at all, while others tear their hair out trying to get the thing to POST.
I would say that by the end of the year you should have little trouble ordering a B450 or X470 motherboard with a mature, stable BIOS that will run right out the box. But if you can't wait that long, a low-end X570 would be your best choice, and give you the fewest headaches.
I'm writing this on a computer I built last month, with a Ryzen 3600 and an MSI X570 Gaming Plus motherboard. I don't need PCIe4, but the system POSTed and ran the first time I powered it up, and it has been rock-solid ever since. One of the B450 motherboards would have met my needs at a lower cost, but I wasn't willing to wait. I decided it was better to spend the extra money (which wasn't that much) for something that (should) work out of the box. And so far, I'm happy with my choice.