which i bought from second hand
Used hardware is sold "as is" and there is 0 expectation for it to work like brand new hardware. Nor is there any warranty with used hardware.
And with used GPUs, there is 0 idea what kind of abuse it has seen. It could very well be ex-mining GPU, that has custom mining BIOS on it, to reduce the clock speeds according to the miner needs.
You could try to flash the GPU BIOS, it might help. Or it might brick the GPU completely. Your call.
Since RX 580 2048S is China only SKU, there are no official BIOSes for it. There is unofficial one you could try, linked by Lutfij above. But do that on your own risk.
With hardware, you have 2 choices;
1, Buy from questionable source, no-name hardware and play the lottery that you MIGHT get decent piece of hardware for paying peanuts.
Buying used always has it's risks and getting working hardware is 50:50 chance. Either it works and you scored a great deal (hence why people buy used hardware in the 1st place, to get great deals), or it doesn't work (or works partly) and you have a nice paperweight. Not to mention money wasted + your own time and effort troubleshooting it.
2. Buy from reputable source, brand name, brand new hardware, get warranty, be assured it works, while paying proper price for it.
I, personally, am not rich enough to buy used hardware. Thus, i only buy brand new stuff.