Libre office writer sometimes adds unwanted lines after using the "enter key". How do I stop this?

Libre office writer sometimes adds unwanted lines on the document after using the “enter key”. How do I stop this?

Writer uses various types of styles: Paragraph, Numbering, lists and so forth. If you hit the enter key you are starting a new Paragraph for line breaks use shift enter.
If this helps then please tick the answer (:heavy_check_mark:) …and/or show you like it with an uptick (∧)

Possibly that…:

Automatic lines in Writer

If you start a new line in a Writer text document by typing three or more hyphen characters and press the Enter key, the characters are removed and the previous paragraph gets a line as a bottom border.
To create a single line, type three or more hyphens (-), or underscores ( _ ), and then press Enter. To create a double line, type three or more equal signs (=), asterisks (*), tildes (~), or hash marks (#), and then press Enter.
To remove an automatically drawn border, choose Format - Paragraph - Borders and select no border.
To undo an automatic border replacement once, choose Edit - Undo.
To disable the automatic borders, choose Tools - AutoCorrect - AutoCorrect Options - Options and clear Apply border.

Source: Drawing Lines in Text - LibreOffice Help