PHP8.1 is not supported in NC yet, but some OS's has transitioned to it, leaving PHP7.4/8.0 behind

One can run multiple php instances. Why not just set the system php to 8.0 for nextcloud 23. I explain how to do it in this post