That seems like Lost Mode:
Use Lost Mode in Find Devices on iCloud.com - Apple Support
If this Mac has been yours, restore the backup from prior to the Apple ID change? Or follow the sequence to transfer Activation Lock listed below?
If this Mac is a recent acquisition, contact the seller and have them perform this sequence to prepare for the transfer to another Apple ID and to relinquish Activation Lock:
What to do before you sell, give away, trade in, or recycle your Mac - Apple Support
Or request a refund from the seller, if the seller is unable or unwilling to remove Activation Lock.
Taking over a Mac means existing installed apps are tied to the old Apple ID, as well.