How to curve a cylinder
The basic way to do it is to switch to top view, select the edge, put your 3D cursor where the center of the rotation is supposed to be:

Select the Spin tool:

Rotate the edge, use Ctrl to constrain to 10° by 10°, tweak the Operator box parameters if necessary:

You could also use a Curve modifier but it will be a bit slower