you can get a golden castle in different ways:
1 )With events you can sometimes get an "upgrade". You can change a "normal"castle into an golden castle with this upgrade. Like in this "corona"event. If you send 1000 attacks with at least 100.000 troops to banditcamps you will get an gold castle upgrade.
2) sometimes golden castles are given away as a reward or prize for buying gold or participation in the event. May the Easter / Spring event contains a golden castle?
3) You capture another player's golden castle ( This can have consequences! )
4) You can look for a golden castle that has been abandoned (turned gray). But it is very rare for a golden castle to be abandoned. The golden castles are not on the list of abandoned castles and you will have to search the map for them.