macOS manages virtual memory and swap files automatically. However, you can see how it's managing memory: