Turning VSync on and off with a checkbox. How?

I want to turn VSync on and off with a checkbox. But how do I do this? I just have a boolean called “isChecked”, and I have bind it to the button but what should I do with that? Where do I change the VSync settings. Do I need a finction for that? How would I tell the checkbox? This is very confusing.

Besides there is not a single documentation how to use checkboxes. Maybe like this?

Hi
I am using Set VSync Enabled function to enable or disable vsync option. Set VSync Enabled | Unreal Engine Documentation

or you can use it like this