ehemiah built the city walls and erected the gates of Jerusalem. He made the place secure, but there were still very few people inhabiting the city (Nehemiah 7:4).
Nehemiah discovered a list of the Jews who had been in Jerusalem during the days of Zerubbabel. Apparently, he intended to work on finding them (or their children) to repopulate the Holy City. There was plenty of property. There were rulers in place to keep the peace (Nehemiah 7:2). As I said, the walls and gates were erected. And, a schedule to open and close the city had been established (Nehemiah 7:3). But, without people to fill it, Jerusalem wasn't yet what it was meant to be.
Now, as you read the genealogy which Nehemiah found, you will find that it is slightly different than the one in Ezra 2. It is similar enough to make us assume that they have a common source, but different enough to make us pause and consider what the differences must mean. At the very least we should conclude that we have 2 different lists which were compiled by 2 different census takers at 2 different points and places. One commentator explains it by the claim that the list in Ezra 2 was compiled in Babylon when the first journey to Jerusalem commenced, while the list in Nehemiah 7 was made in Jerusalem some time later after the people had settled into the land. The passage of time and the addition and subtraction of individuals along the way is perhaps a sufficient explanation to satisfy the curiosity of a believing mind. Naturally, there is no explanation which would be sufficient to satiate an unbelieving mind.
Anyway, Nehemiah was led by God to call roll to promote growth in Jerusalem (Nehemiah 7:5).