This app was mentioned in 4 comments, with an average of 1.50 upvotes
https://play.google.com/store/apps/details?id=org.secuso.privacyfriendlyactivitytracker has served me well for years. I suspect it's no longer maintained. Which means you need to manually grant it access to physical activity and location. Location, might well be optional. Open source and from a reputable privacy project. Nice UI.
I found this one via F-Droid but since my phone doesn't have a step counter I can't say how it works.
Have been using this privacy focused app for the last year or so.