Changing default settings in iOS app

A number of iOS apps have the ability to alter defaults in the ‘Settings’ CleanShot 2022-01-30 at 05.27.49@2x region of the iPhone.
For example, the weather app allows the user to choose Celsius (ºC) or Fahrenheit (ºF) as the default temperature.

I would like to be able to do tha with my app, but can’t get my head around how to do this and wold apprciate some advice.