Hi,

Welcome to the forum

Try this:
In cell A2 enter: =ROW()-1
Autofill down
Insert a row
Autofill the value just above the inserted row
All values update