The first verb in this verse can either mean to build
or to rebuild.
However, when we include Psalm 147:2b, then it is more likely that what is meant here is to rebuild.
Psalm 147:2a does not need to mean a literal rebuilding with stones; it can also refer to a restoring of the covenant community. Then there is a good connection with Psalm 147:2b, which also deals with people.
2 The LORD builds up Jerusalem; he gathers the outcasts of Israel.