Flag icons are set automatically using the players' location from when they logged in.
When near the border of another country, it may be that the system will read the flag of the neighboring country.
The flag may also change when using a VPN.
Changing your flag is not possible.