Photoshop can use your hard drive, a SSD, or even an external drive as a scratch disk. So it could be the case that you’re checking the wrong disk for space. You can read more about assigning scratch disks here. It’s recommended that you don’t use your main drive — the one where the macOS is installed — as a scratch disk for Photoshop.
Another reason might be that even though your drive has space, it lacks unfragmanted space — which is essential for Photoshop to work properly. Some sources recommend to run disk defragmation in such cases, but it’s not always secure, so we recommend to regularly back up your drive with Get Backup Pro.