A lot of countries require you to declare your total wealth on your tax forms. Then once someone gets audited, that gets checked. Obviously it’s possible to hide it, but that in itself is a crime, and not everyone is willing to risk going to jail over paying taxes.