This worked for me on M1 Pro 2021 with MacOS Ventura, original method was for Big Sur but I changed it using a different type of domain block since the old method doesn't work anymore:
First of all, if you want to trigger the notification you can use this command:
sudo profiles show -type enrollment
Now we will start. First block your Mac from reaching the domain iprofiles.apple.com. For this you can use your hosts file like:
echo "0.0.0.0 iprofiles.apple.com" | sudo tee -a /etc/hosts
or blocking them from your firewall.