If you register a national trademark in one of the EU's member states, it will be valid only in the jurisdiction where you filed your application. However, the EU countries also have the advantage of having a shared IP Office (EUIPO), where you can register an EU trademark covering all 27 member states.
If you are operating with your business, selling your products, or offering your service in a single EU country, it could be sufficient for you to register the trademark there. Applying for an EU trademark makes more sense if you are operating in more EU countries or plan to expand your business. Since national trademarks cannot be extended into an EU trademark, this is a decision you'll have to make beforehand.
It is worth mentioning that with trademark registration in a single EU country, similar EU trademarks in your class will have legal grounds to oppose your application, not just trademarks registered in the same country.
The decision to file a national or EU trademark application might depend on the results of the trademark search, which can give you a better perspective on how many similar applications are already registered with the EUIPO.