Chat with your manager about this. Why that chat? In many organizations, IT security would be minimally inclined to coach, or discipline, or potentially fire employees involved in misuse of the organization's computing resources.
A built-in means to lock macOS involves a token-based login and a card reader:
https://support.apple.com/guide/deployment/use-a-smart-card-on-mac-depc705651a9/web
I would generally not suggest starting out with a problem related to IT security as your first project learning about development on macOS or Apple platforms. Apple has some intro material here: https://developer.apple.com/learn/curriculum/
Topic:
Programming Languages
SubTopic:
Swift
Tags: