40GB free is nowhere near enough space for the scratch disk. The scratch file is used to temporarily store information whilst Photoshop is working. It can grow quickly and a scratch file of over 100GB is not unusual. You need to free up space or allocate a different drive for scratch.
You said you are on iOS 13. The current version of iOS is 14.4.2. In addition, iOS works only on iPads and iPhones. Is your issue with Photoshop for iPad?
You also said you use Photoshop 22.1.1. The current version is 22.4. Photoshop 22 does not run on iOS 13. It runs on desktops and laptops, and you didn't say your macOS. Is your issue with Photoshop for desktop?
As Dave said, though, you will need to clear up free space on your system.