That depends entirely on the resolution and size of the simulation.
The bigger the simulation + the higher the resolution the more calculations your computer has to do.
The thing with simulations is that most computers aren’t fast enough - the moment you have more performance available the more likely it is that you increase the resolution in order to get more quality.
And you need a high resolution for quality - especially for fluid/smoke. Rigid body simulations and cloth are often trivial in terms of performance demand, fluid/smoke on the other hand can easily overpower the strongest commercially available CPU (depending on your demands for quality or complexity).
That being said, I absolutely wouldn’t recommend an Ryzen 5 for 3D in the year 2021 especially not for doing simulations.
The question for you is, how much complexity/quality do you really need and how often do you need it?
How much of it is fluids/smoke because this is the most demanding discipline of all simulations.
Are you just dabbling with it as a hobby, or do you want to do it in any professional capacity?
If its the former, invest at least a 150 bucks more and get an Ryzen 7 with 8 cores (or more), if its the latter I would recommend to put some money on the side and purchase the strongest CPU you can afford with the most amount of cores and also don’t forget the RAM, you’ll needs lots of it for fluids/smoke.
Blender itself is also problematic as it is pretty bad in terms of performance (fluids/smoke, the rest is ok).
If you want to do it professionally, I’d suggest you learn Houdini as it is much more performant as well as competent. Yes, it costs money and time to learn but it will pay off in the long run.
The rule of thumb for simulations is: the more the better - too little and your results will suffer or you fail completely.