Browsing for images in the editor leads to an unexpected Error
This is caused by a bug that prevents users that configure multiple languages to use the kcfinder plugin. So check if there are more available languages are configured at https:////civicrm/admin/setting/localization?reset=1

Restrict it to one, and try again.
At the moment a patch is available at https://github.com/civicrm/civicrm-core/pull/19245. And the PR is accepted so in later versions of CiviCRM you should not see this.