After a few rounds of systemctl edit a unit can collect drop-ins nobody remembers. There is a one-command way back to what the package shipped.
This one deletes files, so look at what you have first:
systemctl cat example.service
sudo systemctl revert example.service
The man page says revert puts a unit back to its vendor version. It removes the drop-in directory (example.service.d/, with everything in it) below /etc/systemd/system and /run/systemd/system. If a vendor-supplied unit file exists below /usr/, a unit file that overrides it is removed too. A masked unit gets unmasked.
Effectively it undoes what systemctl edit, systemctl set-property and systemctl mask did. The command is listed as added in version 230.
One detail to remember: when a unit has no vendor version, because it only exists below /etc/systemd/system, the unit file itself is not removed. So a service you wrote yourself survives, but its drop-ins do not.
Afterwards run systemctl cat example.service again to confirm only the original is left. A running service keeps running with the settings it started with, so restart it when you want the vendor settings to apply.
There is no undo. If a drop-in holds a setting you still need, copy the file somewhere safe before you revert.
Further reading: systemd: systemctl man page
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more