If you want to control your mouse with your head, you need to use an app called Enable Viacam. As there is no in-built option in Windows 11 or Windows 10, you must use a third-party program, as said earlier. For your information, it is a freeware and compatible with Windows 11, Windows 10, and older versions.