PHP is only updated with the app's Cloudron package. There is nothing you can or have to do other then updating the app to the latest version within the Cloudron dashboard --> Matomo app --> update section.
@shrey I think that'd be the Cloudron team that needs to update the package so it is using PHP 8.1 instead of 7.4, if I'm understanding that correctly.
Of course this has to happen upstream first but as apps are compatible with a range of PHP versions and I would assume Matomo is ready for PHP 8.1 at this point, it's on Cloudrons app packaging to upgrade the package to the current version.