The problem you are facing isn't due to the device being enrolled into MDM. The problem you are facing is that the device is still in your former employer's Apple Business Manager instance.
For those that do not know how modern Apple Device Management works, Apple Business Manager is what facilitates automated device enrollment (ADE; formerly a byproduct of the Device Enrollment Program [DEP]).
When an Apple Device (e.g. Mac, iPhone, iPod touch, iPad, or Apple TV) is freshly wiped and goes through the setup assistant, upon connecting to the Internet, it will perform a check to Apple to see if it is a part of an organization's Apple Business Manager instance.
If it isn't, then nothing special happens. The Apple device just continues along the setup assistant as normal. However, if the device is a part of a company's Apple Business Manager instance AND said device is assigned (in said Apple Business Manager instance) to an MDM provider, the device will go through automated device enrollment wherein the Apple effectively enrolls the device into the assigned MDM provider on behalf of the organization.
Devices in Apple Business Manager that aren't assigned to an MDM also don't go through automated device enrollment.
That all said, it's best practices to "Release" Apple devices from Apple Business Manager once they're no longer in possession of the organization.
Releasing is a one-time action that removes the device from an organization's Apple Business Manager instance, never to be managed by that organization again. You can re-add Intel Macs with the T2 Security Chip, Macs with Apple Silicon, iPads, iPhones, and iPod touches with Apple Configurator (The iOS version works for Macs and the Mac version works for iOS/iPadOS devices), but any Intel Macs without the T2 are gone for good, once released.
In short, the MDM isn't the important element here. The Mac you have needs to be released from your organization's Apple Business Manager. Once that happens, you should be able to wipe that Mac and personalize it however you want to.