Glad it worked out. Going forward you may have to watch storage use and adjust accordingly.
Once you reach a point where you cannot delete files anymore there are two approaches:
(1) Move files to be stored in the cloud, freeing up local space on the Mac. Apple offers iCloud storage for this, and there are other options as well (Dropbox, Google, Microsoft). The Apple iCloud integrates well with the macOS. Microsoft's One Drive integrates with use of MS-365 software. One downside to this is that most backup programs (including Time Machine) only back files that are physically on the disk being backed up; files that are physically only in the cloud are not backed up. However one program, Carbon Copy Cloner, can be configured to back up files that are in the cloud, but this requires CCC to download and then copy those files, and no doubt this takes additional temporary disk space during that process. Another downside to cloud storage is that access to those files depends on the internet connection, they have to be downloaded to be accessed.
(2) Buy additional local storage (external drives) and move files to those external drives from the internal drive. Here is one example: Move your Photos library to save space on your Mac - Apple Support
However when you do this, those files on the external drives also have to be backed up.