“Cannot connect to the store” when trying to install games on iPod touch 1st Generation Whenever I try to install an app on my iPod touch 1G (iOS 3.1.3, connected WiFi, I’m signed into iCloud on it, I checked, the app is compatible with iOS 2.0 or later) it only says what it says in the picture.

No matter how many times I press retry, it says the same thing.
Your device mode is classified as obsolete by Apple:
https://support.apple.com/en-gb/HT201624
“Some obsolete hardware products can no longer use the iTunes Store”
https://support.apple.com/en-us/HT208104