Memory compatibility has been a non-issue on since around Intel 6th/7th up until 10th/12th gen. 12th gen with DDR5 is a different story. On the AMD side, stability and maturity was reached with the 5000 series. I can mix and match different brands, latencies and still post at XMP of the slowest stick with those generations of Intel processors and the 5000 series of AMD processors.
With previous generations of AMD processors and motherboards, it's not a pretty picture. Ryzen 1000 series was extremely finicky with non-JEDEC speeds, the 2000 series added marginal stability with the 3000 series finally being able to do 3200MHz without any issues across multiple brands of memory. The earlier motherboards too had less than ideal memory trace layouts so a 2700x that might have been stable on a B450 motherboard at 2933MHz would not being able to post past 2666MHz on a X370 motherboard.
If you see a B550/X570 motherboard advertise memory speeds of over 4000+ then it's using an excellent, modern memory topology with a robust trace layout so you'll have far fewer issues with memory compatibility.
As for the actual memory itself, a lot of memory manufacturers are not qualifying their memory rigorously enough so there are cases with memory that has no XMP profile or just one XMP profile that won't work AMD systems but have no problems with Intel systems.
The QVL (qualified vendor list — memory that is tested stable by the motherboard manufacturer) of a motherboard is a safe option to get high speeds/capacities to work without issues but generally any DDR4 module will work with AMD processors, I was able to get four different brands at 32GB each working on a Ryzen 1700 + B350 system. It wasn't ideal, but I did have dual channel, at an abysmally slow speed of 2133MHz. With two different sticks, 2400MHz became possible. If those sticks were 16GB or 8GB then it would post higher.
During the time of Ryzen's early memory issues, Samsung B-die became highly sought after for it's tighter timings and it's still worth seeking out today only if the price premium is not a whole lot more. Some people chase after B-die's for 5k to 10k more which is not the smartest decision for gaming since you could probably go up a tier in a graphics card for that much, which will give a larger difference in performance. Still, there's no denying B-die's 5% gains in productivity workloads like image editing and I guess spreadsheets. Intel processors don't benefit as much with B-die probably because of the way they handle caching.
Today, I have no problems buying single sticks to run at XMP in dual channel mode. It's when you want more than just 3200MHz C16 or 3600MHz C18 that you'll need to consider matched pairs that are on the motherboard's QVL.
By the way, I recently learned that both of those speeds have the same latency of 10 nanoseconds, but the 3600MHz stick would have 12.5% higher bandwidth. Converting CL numbers (cas latency with clock cycles as units) is done by 1 divided by half MHz (since the speed is double data rate, ddr) multiplied by the CL clock cycles.
So for 3200MHz CL16, 1/1600 x 16 is 0.01 microsecond which is 10 nanoseconds. For 3600MHz CL18, 1/1800 x 18 is also 0.01 microsecond, so both sticks have the same latency. But 3600/3200 is a 12.5% increase in bandwidth. How this translates into real world uplift is a different story for someone far more experienced than I am.
Most of what I said (everything except the stuff about B-die which is anecdotal) is from first hand experience, I have about a terabyte of memory across different systems in daily use at home.