For me (as a programmer) it really varies a ton. I used to put in insane stretches, due to the medication I needed to take in the past and that is how I got used to things in college.
Now I work more regularly, but still can put in a solid 6+ hr day most of the time, and yet some days… yeesh I’m lucky if I can get a third of that. So I work more on other days to compensate.
This is an “Ask” style community, so the answer is however you feel like it is for your situation - I only got us started to give us a beginning for the conversation:-).
But to answer your question specifically about my own POV: some meetings are very productive, so not “only” the coding, no. Also, the 6 hours is quite the lower bound - it could be twice that if I am on a roll, with programming, with design matters, documentation, or whatever.
You don’t have to overthink it:-). Although you can if you like? :-P