@Jonathan Merican Changing the card details shouldn't actually change the keys of your resource to cause permission issues while using the API.
With respect to the error, I see you have not set the endpoint in your call to initialize the client. You can follow these steps or lookup this snippet and add the endpoint details.
from azure.cognitiveservices.search.newssearch import NewsSearchClient
from msrest.authentication import CognitiveServicesCredentials
subscription_key = "YOUR-SUBSCRIPTION-KEY"
endpoint = "YOUR-ENDPOINT"
search_term = "Quantum Computing"
client = NewsSearchClient(endpoint=endpoint, credentials=CognitiveServicesCredentials(subscription_key))
news_result = client.news.search(query=search_term, market="en-us", count=10)
If an answer is helpful, please click on or upvote which might help other community members reading this thread.