If the previous owner did not properly prepare the Mac for sale, then stay away from this laptop. At best the previous owner (likely a business or school) did not properly remove the laptop from their MDM management system and at worst the laptop was lost or stolen. There is no way for you to remove any management systems from the laptop. If it is possible to do so, then the seller would have done it themselves. Keep in mind that if the laptop is still being managed by the previous owner, then they can control the laptop and even remotely erase it or even track you.
This is one of the dangers of purchasing a used Mac these days. At least the seller is being up front about the condition. Many sellers will neglect to mention this issue or even try to hide it (there are ways to temporarily have macOS appear Ok, but after some use or a reinstall of macOS the remote management will be easily seen in most cases). With an Intel Mac you also need to be careful to make sure a firmware lock is not enabled as well.
See if Apple is offering any official refurbished Macs:
Refurbished Mac Deals - Apple
If you want to purchase a used Mac, then do so from a well known respected vendor with a good return policy and make sure to perform a clean install of macOS so that you may possibly be alerted to any remote management or firmware locks (no guarantees on being able to be certain of the former).
The other danger is whether a 2018+ Mac has been repaired by an unauthorized tech and how that repair was performed. Some unauthorized repairs may leave a 2018+ Mac with reduced functionality since Apple pairs parts together and this pairing can only be done when Apple or an Apple Authorized Service Provider installs a replacement part direct from Apple.