I have a list of points and I want to insert attribute number for each point. The number should increase from 1 to the last point. (30 in the example below)
If your points were not plotted sequentially, and you still need to label it from west to east (left to right), please give a try to MMQGIS
(1) Create a new field "x_loc" with an expression
(2) Activate MMQGIS plugin
Menu | MMQGIS | Modify | Sort
Sort Attributes dialog windo, give your point layer (e.g. points) to sort (ascending) by "x_loc" field and save it to disk (e.g. C:/temp/sorted.shp).
(4) Open attribute table of this sorted layer and add new field "rownum" (expression $rownum) as a solution linked in Joseph's comment.
(5) Then the attribute may look like above RHS image. Annotate the points by "rownum" field. (black: original "id", red: "rownum")