Assuming that the question is about Calc:
See LibreOffice Help on Optimal Row Heights.
EDIT: If the content of the cell is a formula, the height of the row will not be adjusted automatically when there is a change in the referenced cell. You must edit the formula, or un-wrap and re-wrap these cells to make the row height fit the new content.
Tested with LibreOffice 6.4.7.2 (x86); OS: Windows 6.1.
Add Answer is reserved for solutions. If you think the answer is not satisfactory, add a comment below, or click edit (below your question) to add more information. Thanks.
Check the mark (
→
) to the left of the answer that solves your question.
If the answer helped you, you can mark the up arrow (
) that is on the left (to vote, you need to have karma of at least 5).