As USAFRet said either cpu will do...depending on your budget I would suggest buying the most cores, the most ram, and the fastest M.2 SSD you can afford. All of those will provide benefits in reducing time to complete work.
If you're just a hobbyist or using the machine for school work even the cheap Ryzen 5 3600 will work very well paired with the MSI B450 Tomahawk MAX...or you can do very well with the Ryzen 7 3700x on that same board if you're using this build for work. If budget is no problem then I would suggest moving to the MSI Unify x570 as it provides more M.2 SSD slots and the faster PCI-E 4 bus.
As far as the i5 9400 I will leave it to others to suggest a good motherboard as I have no experience with that chip.