The primary grounds of acquisition of citizenship under ordinary naturalisation is a certain period of residence in the country The minimum period of residence required for ordinary naturalisation in EU countries ranges from 3 to 10 years. Certain types of residence (permanent, continuous, etc.) may count for naturalisation purposes. Some countries require you to hold permanent residence, pass civic and language test, before naturalising application is submitted. Poland has the lowest naturalisation period (3 years) based on residence offering the fastest citizenship path among all the other EU countries.
Here is the list of EU countries and naturalisation period.
Naturalization (Residence time)
Source: Data from European Commission Study