Here you can see this error - “An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration.” - asap you try to install a new plugin or a theme.
If you want to fix this, I’ll share a simple solution for this:
2) Find “Health Checks and Monitoring” section.
3) Here you can find the list of ports blocked for your account. You can also see the reason for this. This is my friend’s website, and I came to know that there was a malicious file on the server.
I checked the file and found out it’s nowhere related to the WordPress theme or anything, so I just deleted it. I would suggest you take a backup of the file(s) you’ll be removing, it could be something important as well. That’s all.
4) After some time, I went to the WordPress dashboard and tried to install a new plugin. Tada! Now I can do this!
This ‘unexpected error’ issue is gone now. Now I can freely install any plugin or theme without any problem. This procedure fixed this issue, if you know any other methods or if you are still facing any error, do let us know!