Hallo @bauer260
Here are a few explanations on the use of the genitive after the prepositions “dank” and “wegen”.
After the preposition dank:
Both the genitive and the dative are correct. So you can decide for yourself which case you use or which case sounds better to you.
Here is a link:
dank dem oder dank des? dank + Dativ oder Genitiv?.
After the preposition wegen:
Grammar gives a clear answer: The preposition wegen is followed by a genitive .
Here is another link:
I hope this helps you. If anyone else knows anything about this topic, I would be happy to hear any additions.
Have a great week