1.You could use PowerShell to block a user's own OneDrive site access.
Import-Module Microsoft.Online.SharePoint.Powershell -DisableNameChecking
$AdminSiteURL = "https://tenant-admin.sharepoint.com"
$OneDriveSiteURL = "the user's own OneDrive site URL"
Connect-SPOService -Url $AdminSiteURL –Credential (Get-Credential)
Get-SPOSite -Identity $OneDriveSiteURL | Set-SPOSite -LockState NoAccess
2.You could block sign-in for a user so that he cannot log into OneDrive and SharePoint.
Go to Microsoft 365 admin center -> Active users -> Select the user -> Block sign-in.
Reference:
How to Disable OneDrive for Business in Office 365-SharePoint Online?
How to properly deactivate a user in Office 365 and SharePoint?
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.