The first method is aptly named: Dynamic locking constantly monitors the presence of your smartphone near the PC. Once the two devices are paired via Bluetooth, Windows measures the signal strength and, when it becomes too weak, deduces that you have moved away before automatically locking the session.
To activate it, start by pairing your smartphone with the PC via Bluetooth. On Windows 11, open Settings > Bluetooth & Devices > Devicesthen click Add a device and choose Bluetooth.