You can try transferring your files to external media, but even this may not be possible if that media was not mounted before you ran out of free space because mounting external media does require creating a mount point. Maybe try using AirDrop to another Mac, iPhone, or iPad which may be able to rescue some items.
You can try thinning or deleting an APFS snapshot, but this requires booting into Recovery Mode (Command + R) or possibly Internet Recovery Mode (Command + Option + R).
View APFS snapshots in Disk Utility on Mac - Apple Support
https://derflounder.wordpress.com/2018/04/07/reclaiming-drive-space-by-thinning-apple-file-system-snapshot-backups/
If you are familiar with the command line, then you can use the command line to transfer files to external media while booted into Recovery Mode or Internet Recovery Mode.
You can try putting this Mac into Target Disk Mode in order to connect it to another Mac so this "broken" Mac appears as an external drive. It may be a bit tricky locating the files using this method depending on whether either Mac ever had more than one macOS user account, whether the host Mac is running the same or newer version of macOS, etc., but it should be possible to access the data on the "broken" Mac this way. However, due to no free space being available on the "broken" Mac, you may end up needing to use the command line to manually mount the "broken" Mac's SSD as read-only. Even if you are already familiar with Target Disk Mode, make sure to read the instructions as things have changed somewhat if either Mac is running macOS 12.x+.
If you don't have access to another Mac, then you boot into Recovery Mode to modify the security settings to allow booting from USB. Then install macOS to an external USB3 drive, boot from the external macOS USB drive in order to try the suggestions I mentioned earlier for transferring files from the "broken" Macs internal SSD to the external boot drive.
If these tricks don't work, then you can try contacting a professional data recovery service such as Drive Savers to see if they can recover the data for you, otherwise, you will lose any data that was not backed up since at that point the only way to fix things is by erasing the SSD of the broken Mac and reinstalling macOS...erasing the SSD will destroy all data on the SSD.
People should always have frequent and regular backups of their computer and all external media (including the cloud) which contains important & unique data. This has never been more critical than when using SSDs and especially the 2018+ Macs. There are a lot of ways to lose access to your data with the recent Macs and recent versions of macOS with all the new security features, plus with 2018+ Macs it may be impossible to recover data if the 2018+ Mac has any hardware issues especially with the Logic Board.
FYI, you should always have at least 20GB of free storage space available at all times for the normal operation of macOS. For some workloads you may need to keep even more free space available since even 20GB can disappear very quickly with some workloads.