Flag icons are set automatically based on a player's location when they log in. Unfortunately, it is not possible to change your flag in the game settings. If you are near the border of another country, it may be that the system will set the flag of that neighboring country. Your flag may also change when using a VPN service.