I have found data that seems to be contradicting: statista gives public spending at country level between 40% and 60%, but eurostat gives an aggregate figure of about 20%, as shown in the following pie chart: Which is it? Is there a difference in the definition of public spending and general government expenditure? Edit: I am comparing different years, 2017 and 2019, but the percentage change of each category is relatively stable over the period, giving the same order of magnitude.
The data provided by Statista are estimates of public expenditure to GDP ratio for year 2017 while the Eurostat data are for year 2019. Consequently I do not see any a priori reason why the two series would be expected to match. They are not necessarily contradictory as they are for different years.
Furthermore, I can't see the information on Statista on the methodology/sources as it is hidden behind a paywall. It is quite possible that Statista's definition of public spending does not match the Eurostat definition of government expenditure. The definition provided by Eurostat is:
Final consumption expenditure by general government includes the value of goods and services purchased or produced by general government and directly supplied to private households for consumption purposes.
Where general government is defined thusly:
of institutional units which are non-market producers whose output is intended for individual and collective consumption, and are financed by compulsory payments made by units belonging to other sectors, and institutional units principally engaged in the redistribution of national income and wealth.
If you happen to know the Statista definition you can compare them.