Hi @AAAAAAA
I believe you can lock the SharePoint site by using the following documentation:
Lock and unlock sites
As a global or SharePoint admin in Microsoft 365, you can block access to a site or make a site read-only by using Microsoft PowerShell to change the lock state of the site.
https://learn.microsoft.com/en-us/sharepoint/manage-lock-status
---------------------------
If this is helpful please mark as correct answer.