Lock your Windows 10 PC automatically when you step away from it https://support.microsoft.com/en-us/help/4028111/windows-loc...
While macOS doesn't include such a feature out of the box, apps like Near Lock https://nearlock.me exist.
EDIT: Just found Rohos Logon Key for Windows and macOS:
https://www.rohos.com/products/rohos-logon-key-for-mac/
It "converts any USB drive into a security token for your computer" and can "automatically lock your Mac screen when the key is unplugged".
Lock your Windows 10 PC automatically when you step away from it https://support.microsoft.com/en-us/help/4028111/windows-loc...
While macOS doesn't include such a feature out of the box, apps like Near Lock https://nearlock.me exist.
EDIT: Just found Rohos Logon Key for Windows and macOS:
https://www.rohos.com/products/rohos-logon-key-for-mac/
It "converts any USB drive into a security token for your computer" and can "automatically lock your Mac screen when the key is unplugged".