You can always extend the protection of a trade mark to other countries later, including the EU (EU trade mark).
However, you should bear in mind that someone can always “get in the way” in other countries. In other words, if you first register the trade mark in Germany and then 3 years later for the EU, you must expect that in the intervening period someone else will have registered a trade mark identical or similar to your trade mark in the country you then want to protect, which could lead to a trade mark conflict.
You can rule this out if you apply for protection in the other countries in the period of up to 6 months after filing the German trade mark (priority period). This is because the priority (seniority) of the German trade mark is also granted to you in the other countries for this period. If, for example, you apply for the EU trade mark 4 months after the German trade mark and claim this priority, you can take action against third parties who have applied for an identical or similar EU trade mark 3 months after your German trade mark but 1 month before your EU trade mark: because you can invoke the better priority in Germany against them, which then also applies to your EU trade mark.
In this respect, you can initially only apply for the German trade mark, but you should keep the issue of priority in mind if you intend to extend the protection of the trade mark to other countries in the foreseeable future.