The game must be running through the SteamVR runtime.
OpenXR
If you are using OpenXR, ensure SteamVR is set as the default OpenXR Runtime. (SteamVR Settings > OpenXR tab > Set as default runtime)
Launch options
Many games will accept launch arguments that tell it to run through SteamVR. Try -vrmode openvr or -hmd=SteamVR (Right click the game > Properties > Launch options)
For more troubleshooting support, see the OVRToolkit wiki (Oculus Fixes)