If you're running Mojave or Catalina with an APFS partition, don't even worry about it.
It's always better to have an SSD with free space on it, but where you get into trouble is by writing constantly to a full drive.
Here's why: An SSD has a number of sectors that store data (generally 512 or 4096 bytes). Each sector can only be erased and written a certain number of times (typically 1,000-10,000). Depending on whether it's a NAND or a NOR-like technology, erasing a sector will clear it to all 0's or all 1's. "Writing" a sector of data means flipping some of the bits to the opposite value. You can't erase a sector, flip a bit, then flip it back to what it was...you have to erase the sector completely, then set the bits that should have the opposite value.
The OS tries to erase and write evenly across the device (wear-leveling). The more sectors it has to play with, the better.
macOS goes a step further with APFS by implementing static and dynamic wear leveling, coordinated with the hardware controller and T2 (see Wikipedia's article on wear leveling). The OS will actually move static data that hasn't changed around the disk so that you don't have a bunch of large, unchanged files sitting on nearly new (low write count) sectors while you churn the "free" area of the disk. This means that having a nearly full disk doesn't actually hurt longevity that much.
What you should NOT do is run a frequently changing database or a file that is constantly overwritten on your SSD. Those belong on HDD's (spinning rust drives).
The real reason why you shouldn't run your internal disk almost full is because many applications (and the OS) don't handle disk full situations well. It's okay to be close to full, but try to never hit "0 bytes available." macOS will warn you when the boot disk is getting close. Otherwise, don't worry about it too much!
For the full story, see Wikipedia's article on write amplificaton
Unfortunately this is one of those areas where, if you're on Windows, the story is completely different than if you're on macOS, so the general public's wisdom on the matter is sometimes quite harmful.
Example: Most anti-virus don't even have signatures for a single piece of Mac malware because Apple already includes XProtect Description of XProtect. It's free, built-in and, Apple updates it almost daily. Unless you're downloading binaries from Tor, pirated software or otherwise risky software, you are extremely unlikely to catch malware on your Mac. When Apple becomes aware of something, they update their signatures and it's generally stopped in its tracks. I only download apps from the App Store, SetApp or from source code I downloaded and built from major repositories. Running an anti-virus on your Mac just slows it down because 99.9% of the signatures are only for PC/Windows software...so, you're compromising performance and memory so that your neighbor running Windows won't catch anything from your Mac; it's highly unlikely that it'll catch malware that affects your Mac...most of them don't even try.
So, you did a good thing by posting this question. You should always ask "But is that advice good for Mac users too?" rather than paying attention to common wisdom that applies to PC's.