Shortcut to a specific accessibility feature
For Switch Control, see my answer to: applescript access switch control through system preferences
For Head Pointer:

How is it possible to check the box you mentioned for Head Pointer?

         Quoted question from comment under the OP.
Test this example AppleScript code in Script Editor to see if it works. Then try it again with the activate command commented out. e.g.: # activate
It may only work with System Preferences being visible, you'll just have to see.
if running of application &quot;System Preferences&quot; then
    try
        tell application &quot;System Preferences&quot; to quit
    on error
        do shell script &quot;killall 'System Preferences'&quot;
    end try
    delay 0.1
end if

repeat while running of application &quot;System Preferences&quot; is true
    delay 0.1
end repeat

tell application &quot;System Preferences&quot;
    activate
    reveal anchor &quot;Head_Pointer&quot; of ¬
        pane id &quot;com.apple.preference.universalaccess&quot;
end tell

tell application &quot;System Events&quot;
    tell application process &quot;System Preferences&quot;
        repeat until (checkbox &quot;Enable head pointer&quot; of ¬
            tab group 1 of group 1 of window 1 exists)
            delay 0.1
        end repeat
        click checkbox &quot;Enable head pointer&quot; of ¬
            tab group 1 of group 1 of window 1
        delay 0.1
    end tell
end tell

tell application &quot;System Preferences&quot; to quit


Notes:
The example AppleScript code can be use in a Automator Service/Quick Action and assigned a keyboard shortcut in: System Preferences &gt; Keyboard &gt; Shortcuts &gt; Services
Or there are several third party applications that can trigger AppleScript scripts, with assigned keyboard shortcuts , e.g. FastScripts.
Note that I am not affiliated with the developer of FastScripts, just a satisfied user.

Note: The example AppleScript code is just that and sans any included error handling does not contain any additional error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors. Additionally, the use of the delay command may be necessary between events where appropriate, e.g. delay 0.5, with the value of the delay set appropriately.