https://www.dpma.de/docs/dpma/veroeffentlichungen/broschuere...
German Quote: "Welche Rolle spielt das Datum der Anmeldung? Wie bereits unter „Markenrecherche“ erwähnt, gilt im Markenrecht der Prioritätsgrundsatz. In der Regel hat die ältere Marke – das heißt die Marke mit dem früheren Anmeldetag – die besseren Chancen, sich im Konfliktfall durchzusetzen"
which roughly translates to:
"What role does the date of registration play? As already mentioned under "Trademark search", the the principle of priority applies in trademark law. As a rule, the earlier trade mark - that is to say the mark with the earlier filing date - will give you the better chances to assert yourself in the event of conflict."
This doesn't sound as clear cut and is worded this softly simply because of Very Old (think 50-100 years) German companies having very legitimate claims of prior use that can't be overlooked, although the german legal system prefers the simpler and cleaner first-to-file ruling.
That means in effect for startups first-to-file is the guideline you should look into. I've paid expensive lawyers to learn this lesson.