I fixed the issue with the following link:
https://www.wpbeginner.com/wp-tutorials/how-to-fix-secure-connection-error-in-wordpress/
But for those who have the same problem, don’t forget to update the IP address of wordpress.org in the solution in the link!