How does app lock work?
Turn on App lock in Settings and set an inactivity timeout. After the timeout — or immediately when you switch away, if the timeout is set to 0 — the app locks and asks for Touch ID or your macOS password to unlock. It also locks when the app first opens.