Find your motherboard first.
It is your choice about size(ATX-M-ATX...) and features.
Then go to a ram vendor web site and access their ram selection app.
Enter your motherboard and you will get a list of supported ram kits.
ryzen is picky. You want a kit that is known to work.
And... do not plan on adding ram for an upgrade later. It is not 100% certain to work.
Buy all that you will ever need up front.