b. Double-click right column separator in column headers (this adds 2 mm more by default).
a. Choose menu
Optimal Width… (can uncheck Defalut value, and set Add: to 0).
The same is said at LibreOffice Help on Optimal Column Width.
If you select a cell or a few cells in the column, the width will adjust to these cell/s. If there is a cell with multiple spaces after the visible cell content, this will affect the total width.
You can add the button Optimal Column Width to the Format toolbar.
Tested with LibreOffice 22.214.171.124 (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.
Check the mark ( → ) to the left of the answer that solves your question.