Do I need to increase PHP's maximum usable memory capacity to solve this problem? Or is there another solution?
Yes, once you try with the increase PHP's maximum usable memory capacity with this variable limit also MAX_URI_LENGTH limit.
Also, you can check it in your php.ini file, dom extension is installed or not.
If not installed, first you will be installed dom extension in your php file.
You have verified the curl and dom extension is installed or not. For checking the extension follow the below command:
$ php -m
If curl extension is not installed then follow the below command for installed curl extension:
$ sudo apt install php7.4-curl
Alternatively, you can follow the below link for more refrerences: