I use toggl (https://toggl.com/). Can't recommend them highly enough and their free tier is amazing for a solo-person.
For forming a habit 1) live tracking is essential and 2) make it as easy on yourself as possible. What I learned after many years is that the level of granularity I actually care about is at the project basis and not the task basis, so just logging stuff to big buckets, not sweating if it's off by 5-10 minutes, and trying as hard as possible to always be logging. I almost exclusively only log time when I'm on my laptop which makes it easier to not forget.
For forming a habit 1) live tracking is essential and 2) make it as easy on yourself as possible. What I learned after many years is that the level of granularity I actually care about is at the project basis and not the task basis, so just logging stuff to big buckets, not sweating if it's off by 5-10 minutes, and trying as hard as possible to always be logging. I almost exclusively only log time when I'm on my laptop which makes it easier to not forget.