Cannot add new plugin to my WordPress site

Hello! I’m having a problem to add a new plugin to my site. Why do I keep getting an error: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. How can I fix this?

Hey there!
Hope the solution in this link helps
https://www.google.com.mx/amp/s/themeisle.com/blog/how-to-install-a-wordpress-plugin/

Try

define('WP_HTTP_BLOCK_EXTERNAL', true);

Add above line in your wp-config.php .