That is not true that EU can legislate anything.
Here is a clear list of areas: https://commission.europa.eu/about/role/law/areas-eu-action_...
Also EU does not have a government. There are 3 powers lets say:
- EU Council which represents the countries governments
- The EU Commission representing EU interests
- The EU Parliament representing citizens
We go back to what I said: when introducing a new level of abstraction we got a new governing power. But lets never forget that except the EU Parliament all the others are formed by people proposed by countries governments.
Thus as EU citizen one:
- influences EU direct by voting the EU parliament
- influences EU indirect by voting who rules their countries which will then send people to EU Council and Commission
As you notice the countries governments have more power (2 out of 3) than the EU parliament even if they are different kind of powers.
Still in the end each citizen that goes to vote is deciding the direction of EU in three ways (one direct citizen to EU and two indirect citizen to country to EU). Want more federalization then vote parties that go that way. Want more nationalism then vote that way. But nobody (or few people) really think then consequences of what they vote in their own countries and how that affects everybody in EU.