I have used terraform 3.14.1 version in the required_providers parameter, for one of the resource i had to upgrade to 4.67.0 which is the latest version when i am posting this issue. Upon doing terraform init
i faced the below problem
Error: Failed to query available provider packages
Could not retrieve the list of available versions for provider hashicorp/aws: locked provider
Terraform Registry 3.14.1 does not match configured version constraint 4.67.0; must use terraform init -upgrade to allow selection of new versions
Solution:
As mentioned in the error proceeding to terraform init -upgrade
solved the issue