See the article Activation Lock for Mac - Apple Support
How to disable Activation Lock
To disable Activation Lock, turn off Find My:
- Choose Apple menu > System Preferences, then click Apple ID.
- Select iCloud in the sidebar, then deselect Find My Mac on the right.
- Find My also turns off when you sign out of iCloud, such as when preparing to sell, give away, or trade in your Mac.
If you don't have access to your Mac, use a web browser on another device to remove Activation Lock.
If your previously owned Mac shows an Activation Lock window that asks for someone else's Apple ID, the previous owner may need to remove Activation Lock for you.
How to remove Activation Lock - Apple Support