Use a tripod. It helps to keep your camera steady in any position that you select, you can then compose your picture more precisely.
A bubble level gives you a clue to any tilting. Some tripods come equipped with a level; otherwise, an add-on accessory is available that slips onto the camera's flash shoe. But remember: Such a bubble is NOT always foolproof.
Trust your eye, on occasion the horizon may not look right even though the camera appears to be level and even though the bubble level confirms it. In those cases you may need to angle the camera slightly to keep the image level. This can happen more often with sloping ridgelines, lakes that have shorelines. Even though these lines slant a bit they actually appear tilted in your image, levelling them would be recommended!
After you have composed your shot perform this last minute check: Check your viewfinder and see if all looks “right”
Specifically: Is there equal amount of sky, land or sea on each side of the frame?
Finally: Think of these horizon line suggestions as your guide to taking a typical well balanced shot, however as most photographers like to experiment with their cameras maybe by tilting your camera you will produce a quite amazing shot.