Later I followed the Workaround in Bug Reports 2508122 and that seems to have fixed the problem.
MATLAB crashes when opening the help browser or searching in it (2508122)
Modified: 10/26/2021
Description
MATLAB might crash during either of the following actions:
Opening the help browser
Using the search string feature in the help browser on a machine behind a proxy server
Workaround
Use the following steps to work around this issue:
Regenerate your MATLAB preferences using these instructions:
https://www.mathworks.com/matlabcentral/answers/99625-how-do-i-regenerate-my-matlab-preferences
Restart MATLAB.
Change the documentation location to "Installed locally":
Open the MATLAB preferences by selecting Home > Environment > Preferences in the MATLAB Toolstrip.
In the left panel, click Help, then select Installed locally under Documentation Location.
Restart MATLAB.
Affected Release(s) Affected Product(s) Fix Options
MATLAB Get R2021b
R2021a MATLAB Get R2021a Update 5