Most likely the URL you gave to create the algod client is incorrect.
Can you show your code? (replace any secret token/key with “**”)
How do you connect to the network? There are 3 options explained there: Set up your development environment - Algorand Developer Portal