You can modify PHP Memory Limit as per your needs using CloudLinux PHP Selector in cPanel.
1. Log in to your cPanel account.
2. In the Software section, click on Select PHP Version.
3. Click on the Options menu.
Note: If the Options page shows an error related to the native PHP version, change it to a non-native version first.
4. Search for Memory Limit and select it from the drop-down menu that appears in front of it. Then decide on the right limit based on your needs.