Assuming there's no visible damage to it, and if your software is up to date, you could try simply rebooting the phone.
If that fails, you can also try to reboot into safe mode.
To do this, press and hold the Power button, when the shut down screen appears, press and hold on the Power Off icon, this will bring up the option to boot into safe mode.
This mode disables all 3rd party apps, but factory apps should still work.
Sometimes installing new apps can cause issues, and this will help determine if this could be the problem.
Also, you could check in settings to make sure air command hasn't been disabled.
Hope this helps.
Hi @GavOz, thanks for reaching out. A few things to check that may be causing this are:
1. Is your S Pen damaged? Is the button on the S Pen loose, or stuck?
2. Is your device software up-to-date?
3. As mentioned by Dolgogi, I suggest using Safe Mode to see if the function works.