There’s some info on how this can be configured on Lineage in the post linked below. I’m not sure whether stock Android / Fairphone Open works the same way, or whether this is lineage specific, but it’s worth a shot:
Solved. Obviously I connected the keyboard while the screen was locked. Now I did that with unlocked screen, and a dialog popped up “select your layout”. There I could add German layout, and now umlauts work fine, y and z keys have the correct location, as do all the other keys. Thanks!