Here are a few tips on how to level the horizon and straighten the perspective in Adobe Lightroom.
Switch to Develop mode (shortcut D), then in the Lens Correction tab, check Enable Profile Corrections. Your lens will automatically be selected if your image contains the metadata, but if not, you can select it manually from the Lens Profile options:
Before lens correction (distortion & vignetting): After lens correction:
To level the horizon, select the Crop & Straighten tool in the upper right menu (shortcut R), then either adjust the angle slider or drag the handles until your image lines up with the grid. Use horizontal or vertical lines in your photo as references, then hit Enter:
Alternatively, to correct the horizon, select the straighten tool or hold down command on Mac or control on Windows, then draw along a reference level line in your image. Be sure to check the 'Constrain to image' checkbox to avoid visible borders after the crop:
There are a variety of overlay grids you can use depending on your needs. Use the keyboard shortcut O to cycle through. Toggle the grid overlay on or off with the H shortcut:
Under the 'Transform' tab, check whether the preset buttons can fix the distortion automatically or use the Guided Upright Tool and manually draw multiple guides.
And finally, for full manual control and precise fine-tuning of perspective, use the sliders to correct your image: