It seems that many people have asked how to create a changing line before. They usually say that it is more convenient to use vector software. If you use PS, you can only draw a curve, and then use alt+ctrl+shift+t to move and copy it over and over again, but this is how it is done. The shape of each line is the same, which is relatively rigid.
I tried it and found that it is actually quite simple to use PS to create the changing lines with the effect of vector software.
Rendering:
The method is as follows (if it is a lower version of ps, this method cannot be used because of the lack of "transformation" function)
First open the menu "Edit" - "Preferences" - "Wires, Grids, Slices and Counts" and set the grid part as needed. Generally speaking, it should be set denser. The default is too sparse.
Create a new file, ctrl+' to display the grid, enlarge the view, and use the pen tool to draw a path back and forth in a zigzag pattern (the nodes will automatically snap to the grid, so it will be drawn quickly)