Is there an app I can use to automatically track screen time for each desktop on my MacBook?
I don't know about a solution that tracks time per desktop but what I use is Observe (https://qotoqot.com/qbserve/). It tracks the time you spend in any application and you can add filters so screen time in one app is allocated to a specific project. You can even define working paths. So every time you work on a file in specific directory it also gets allocated to a specific project.