Essentially my whole working life has been like this. I probably have one or two good work days per month. The rest of the time it really goes no where.
I was diagnosed with ADHD at 30. This seems to be a big part of it.
I would recommend talking to a professional who might be able to dig down to the root cause of this for you, especially if it has started recently. Also, look into speaking to a doctor to rule out any physical conditions.