There may be a type of GDP that removes government spending (I dont know) but the number typically used by politicians and media include some government spending. I dont think (someone correct me) that things like Social Security spending is included in GDP. But there is some government spending included like defense.
What I see as the major problems is that it says nothing about quality. We could pay 10,000 people $100,000 to dig holes and fill them in and raise GDP by $1B. protective tariffs that do, in fact, raise domestic production but drive up prices for the consumer, increase GDP. Here’s one for you, again someone correct me if I am wrong, but domestically produced electronics, a market that has seen huge technological improvement AND price cuts would actually LOWER GDP ceteris paribus. Of course people would buy more but, all in all, a lower price for a more advanced computer means a lowering of GDP even though it is better for the economy and the consumer.
I heard one person say, GDP is about the worst metric we have, but it is the best thing anyone has come up with so we still reference it.
The thing about having a metric about how well the economy is doing is that you would have to somehow measure things like marginal utility which is subjective. you would need to measure malinvestment and overinvestment which, if you could do, then central planning might work but Mises and Hayek pointed the knowledge problem in such economies.