I've noticed this, too. At first I thought it would possibly right itself, but I noticed yesterday that it still had not collected data for the past month. I started looking around in the Health app, trying to find a problem, but couldn't correct anything. Today I started searching online for solutions. Apple Support only had information on connecting it to other apps for input, like the Apple Watch. I don't have any other input sources, so I thought maybe this ability had been taken away in a recent update. But just out of curiosity, I went to the area they suggested. I noticed right away when I opened the Health app that the phone showed steps walked around the house today while I had it in my hand! It wasn't doing that yesterday.
While looking at Steps, below the chart there are options. One of them is Data Sources & Access. In that, the options are Apps Allowed to Read Data (I have none) and Data Sources (set to my iPhone). When I clicked on Data Sources, lo and behold, it showed all the steps I've walked every day going back forever. It was all there. And when I returned to the Steps charts, it was all there. So...basically I changed nothing and it just started working. Has anyone else had a similar experience?
It's not a perfect data collection system for steps, but it's nice to have this relative information on activity.