Failed to Query

Hi I’m getting this below error while I’m running any script.what would be the issue?

Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/local: could not connect to registry.terraform.io: Failed to request
discovery document: Get" https://registry.terraform.io/.well-known/terraform.json": http: server gave HTTP response to HTTPS client

Hi,
Did you able to solve it and if yes please paste the solution here I am also struggling with same issue.

Thanks,
Muhammad