A friend of mine said there was an app called RescueTime, but you can't own your data. Then I noticed there was this open source tool called ActivityWatch [1]. The Github of ActivityWatch shows a couple of extra options.
So how do you track your time to know how productive you are / how much time you waste?
I remember one guy commenting on here that he uses a chess clock and clicks on one or the other to know what time he wastes and what time he is productive. I find it a very cool idea, but also a bit too involving.
[1] https://github.com/ActivityWatch/