How we can update page no based on section

How we can update page no based on section

Unfortunately, I don’t know what you mean by that.
Can you please explain what exactly are you referring to?

I want to update page number of word doc

If you use the PAGE field, they are automatically updated.
See the Fields example or the Headers and Footers example.