Did you buy it secondhand? As far as I know a lot of RX580s are used for mining([link|https://cryptomaniaks.com/what-is-gpu-mining|this link explains what mining is]), which puts the GPU under constant stress and makes it degrade way faster than it's supposed to. The PSU should be fine because on my own RX590(firsthand) it would just crash the game and sometimes shut the computer off if it can't draw enough power. Uninstalling the drivers as @aactech suggested could work, but I think the card is just either too old or have some manufacturing issues from the start. You should consider getting a new card if you can; the RX580's way too old and would struggle a lot if you're running modern graphic-demanding games. [br]
[br]
If you insist on fixing it, then you probably need to replace the VRAM, which is soldered on the graphic card and requires a lot of skills to swap successfully. Maybe a repair shop would know how to replace it?