Here my first solution with a wave modifier:
I started with a default cylinder, sized it on z, then deleted the bottom and top face, filled them again with grid fill, then used the 2 modifiers.
Geometry nodes:
modifier stack:
proportional editing:
Cylinder modeled as described in first solution, then select middle vertices and just move it: