When something in Nextcloud seems stuck, the history of the background jobs is a good first place to look, and occ can print it.
sudo -E -u www-data php occ background-job:history -s 3 -l 10
The command shows past jobs with run id, status, class, start time, server id, PID, duration and memory use. The -s option filters by status: 0 is running, 1 succeeded, 2 failed and 3 crashed. You can repeat it, so -s 2 -s 3 gives you failed and crashed jobs together. -l limits the number of rows (the default is 200) and -c filters on a job class.
The docs show an example where a job of the class OCA\Text\Cron\Cleanup has the status Crashed with a duration of about ten minutes. That is what you are looking for: a job that keeps dying, or one that runs far longer than the rest.
To see what is running right now, use occ background-job:running. To run one job by hand, occ background-job:execute 42 takes the job id from occ background-job:list.
The caveat: the history tells you that a job crashed, not why. For the cause, go to the Nextcloud log, which occ log:watch can follow live.
Further reading: Nextcloud admin manual: system and maintenance commands
Going deeper: Guide: put Nextcloud behind Nginx Proxy Manager with HTTPS and the right headers