Is this Wordpress Critical Error after Upgrade to 5.24.1 serious?
This is a regression bug since 5.22.1. Just submitted PR to core, can you please try upgrading after applying patch? If the patch works it would be helpful to add your QA results on PR to help the PR to get merged in next release.

Thanks

Pradeep