I am having the same issue since upgrading to NC21. What is the error message you get when you run occ or from cron? Here is what cron tells me:
PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 438272 bytes) in /var/www/nextcloud/3rdparty/composer/autoload_real.php on line 37
There are some troubleshooting suggestions in this other topic but it’s a convoluted mix of situations and none of them worked for me yet. I am still digging!