The phenomenon you see is a custom of the Hui or Salar people or local Muslims:
Generally, men wear white or other colored "top hats" , Wearing a white hat is a symbol of Islam, which means that you can tell that he is a Muslim by wearing a hat. Most Muslim areas in our country wear such hats. If you go to South Africa, they wear hats because they are an island country. Like a boat shape.
Ladies generally wear a "hijab" or "kerchief", which mainly means that others cannot see their naked body or hair. The customs vary from place to place. In countries where the state religion is Islam, In the Middle East, you will see some women covering their heads with one eye exposed.
In Qinghai a long time ago, hijabs mainly came in three colors. Generally, unmarried girls wore green hijabs, married women wore black hijabs, and older people generally wore black hijabs. Wear white. But now it is not so clear-cut that it depends on local conditions.