Changing game settings from the main menu

Please tell me, how you can add an on / off, for example, shadows in the main menu of the game? As I understand it, need to refer to the settings of the game engine, but I don’t know how to do it.

If you have realtime lights, you can disable casting shadows on the light component: