There are 2 possible causes
A) If the free space on your storage device is so low macOS cannot create any new swapfiles.
B) if you have an application (or a few applications) that have asked macOS for virtual memory address space in such huge quantities that macOS ends up creating so many virtual memory page tables to keep track of the virtual address space created that more RAM is being taken up by page tables than is available to actually run the applications.
In this 2nd case it is either a side effect of use very memory (RAM) intensive applications (video editing, very large format photo editing, audio editing, etc...), _OR_ it is a memory leak in an application.
A memory leak is where an application ask for virtual memory, macOS gives it to the app, the app uses the address space, then forgets to give it back to macOS. The app then asks for more virtual address space, totally forgetting about the previous request. This cycle repeats until the application has asked for so much virtual memory that macOS has created a huge number virtual memory page tables, and macOS is using so much RAM to keep track of virtual memory address space, that it no longer has RAM available to give to applications.
Just to be clean. A) relates to free space on your storage device (Disk, SSD, etc...). B) is talking about RAM (Random Access Memory).