It has the cables but its some oem unbranded psu and i guess it would be sketchy even trying to run the RX 580 on that
I really doubt that a 300w psu has both an 8 pin and a 6 pin aux pcie cable that the RX580 requires.
A 8 pin cable can draw up to 150w and a 6 pin 75w.
Plus, a pcie slot can deliver 75w.
That leaves zero for the processor and peripherals.
All this assumes that a 300w psu can actually deliver advertised power.
The danger is not that it might not work.
The danger is that an overloaded chea psu can damage other parts if it fails under load.