Hello Klaas,
Well if using an SD card they do go bad in unusual ways, so my first thought is get a good extended range SD card and try again.
If that doesn’t help. the symptoms do point to router/network/general DNS problems.
I would look thru these posts, especially the one about RasPI’s to see id something helps. The Home Assistant Cookbook - Index