How do I track how much time I spend playing games on Windows?

What you are looking for, does not exist in Windows 10.

Windows' "Family option" has different purpose, you may want to read upon it on these webpages:

  • https://support.microsoft.com/en-us/windows/help-protect-your-family-online-with-windows-security-5e8b9fd8-8372-dba0-eba2-46da8e407026
  • https://www.auslogics.com/en/articles/hide-family-options-in-windows/

Now, it is up to you if you take my word or not on the following. I work as Software Specialist in a group for creating developer tools for 7 years now.

The main hardship in your requirement "how much time I spend gaming" is that, no automatic system will analyze a software for you and make decision if it is in any possible aspect game/ing or not. Not even Steam does. Steam is having a huge database created by humans, entering not only games, but videos, software tools, etc. to Steam. By this category separation, as markup for games exist, it is easy to count seconds, in Steam's system. However inconsistent user entries can interfere with this. E.g.: Wallpaper Engine. It is not a game by purpose, but categorized as one. It's description reads: "Use stunning live wallpapers on your desktop[...]" A friend of mine has already "played with it" 13.3 hours.

Creating one? If somebody takes the endeavor to create one, it will take truly a big effort. You may consider an idea to ask for APIs from all(?) Steam-like platforms. but that has the risk your database is prone to the above inconsistencies and incompleteness.

Much back in past there was softwares like Xfire, you could hook up your games on it and so it collected your gaming stats. In this case it was personally you, who did the job "categorizing" an app as game and putting it under the timer of Xfire. You can do similar in Steam too. I have The Division from Ubisoft, works (currently) via Ubisoft's Connect, but if you add the .exe to Steam's non-Steam library, you can keep on counting spent time even with non-Steam games. And so I created a shortcut for it, so I can signal to my Steam friends, that I currently play Division, even though I own a non-Steam copy of it. This option would slightly miss your raised question, as Steam counts your 2 past weeks gaming time.

I hope I could cover your question. I'm open to brainstorming, let me know if you might consider other aspect.