Disabling the synchronization will convert all users synchronized from AD to Entra ID to cloud only
If you need to do this for some accounts only, then follow https://techcommunity.microsoft.com/t5/security-compliance-and-identity/convert-on-prem-ad-users-from-office-365-azure-ad-to-in-cloud/m-p/42908
"You could terminate the account in Active Directory (which would terminate the account in AAD/O365) after forcing a delta sync, then "reactivate" / "undelete" the account and assign it a license"
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin