Kimai (https://www.kimai.org/) might be what you need. I've been using it since the beginning of this year and it has everything I need for tracking the hours I work, including the fact that it can be self hosted (which is what I did). It can also be used for free as SaaS up to a certain number of users.
I have no connection to the project, I just like it.
I have no connection to the project, I just like it.