Unlike some accounts/wallets where your account/wallet gets automatically locked when you do not use it actively for a long time, you need to lock your Metamask Sign in manually. Locking your wallet is of utmost importance because it carries so many essential details regarding the cryptocurrencies that you have in your possession.
So, if you want to restrict users from accessing your wallet and do not want them to get their hands on your purchased crypto assets, then you are suggested to use the "Lock" feature available within your Metamask Sign in.
However, a lot of us are unaware of this feature and we also do not know where this option is given. So, in that case, what I suggest you do is refer to the steps that I am going to enlist below.
On the web extension
If you are using MetaMask through its web extension, then you can apply the steps that are listed below:
On the MetaMask app
Those of you who are using this wallet service through its mobile app can follow the steps that are given below:
This is one of the most convenient ways to automatically lock your wallet and restrict any unauthorized access to it. To do the same, you can simply sign in to your wallet and go to the "Settings" menu present there. Next up, you can click on the "Advanced" settings menu. From the given menu, scroll down to the bottom and turn on the toggle for setting the timer. Once you have decided on the time, select the "Save" option.
This way, you can easily lock your wallet and make sure that you are not giving your wallet access to anyone. In case you want to unlock your wallet, you simply need to enter the Metamask login password on its main screen and select the "Unlock" icon.