I've lost track of the amount of times I accidentally deleted a file I shouldn't have or messed up a git project in a way it'd have taken ages to untangle, said oops, remembered I have hourly snapper snapshots set up and just copied the previous state over. It's been a massive time- and occasionally lifesaver for me.
If you decide to dive into it depending on your filesystem of choice I can recommend either Sanoid [0] and httm [1] for ZFS or Snapper [2] for BTRFS as automatic snapshot solutions. Good luck with your endeavors!