Mail popped up an alert: “Mail cannot save information about your mailboxes because there isn’t enough space in your home folder.”

My first two suspects in these situations are always Xcode junk or a full Trash.
I opened OmniDiskSweeper and started scanning. I love it because there is no visual fluff. You scan, you delete, you move on. I cleaned up old runtimes, old Xcodes, and VM images. That saved ~70 GB.
The mystery was not solved though. macOS Settings still showed ~300 GB of “System Data.” OmniDiskSweeper did not show it.
Next up I tried CleanMyMac X. I usually prefer OmniDiskSweeper, but I was out of ideas. It found some big caches, but nothing close to 300 GB.
So I kept googling and landed on DaisyDisk. It was blazing fast. I also do not hate the UI, but I do not love it either. It is definitely original.
DaisyDisk solved the mystery tho: all that “System Data” was Time Machine local snapshots.
It clicked. A few weeks earlier I had re-set up my Time Machine backup to a remote drive. The backup started failing, I missed it, and the snapshots kept piling up.
I deleted the local snapshots and freed ~300 GB.
Remove local snapshots
I followed this thread:
How to delete all local TimeMachine snapshots
The commands I used:
tmutil listlocalsnapshots /
sudo tmutil deletelocalsnapshots <snapshot-id>
If you want to delete all of them, the thread includes a one-liner. I didn’t need anything local, so I wiped everything and got my disk space back.