Post is a little confusing. What I gather is you had a 300w psu powering a different cpu/motherboard and gtx1060, and now you are upgrading to a Ryzen cpu/AM4 motherboard and want to know if the old 300w psu will still be good.
Yes and no. It's a 300w psu. Generally in that small catagory are 3rd party OEM psus like from Dell or Lenovo or HP etc, and very few of those are decently built. The other place you find 300w psus is in a aftermarket case with included psu, the whole thing costing $40 or so. That's a $30 case and $10 psu. Guaranteed you get exactly what you pay for there.
So chances are beyond good that that 300w psu is a very old design, with no protective circuitry and wouldn't honestly pass ATX standards.
Will it work, probably yes, but it's extremely low quality, borderline garbage, and will not be doing you or your equipment any favors.
Ask yourself this, is the $500 pc you are building going to be worth powering by a $10 power supply.