Headers already sent
HTML requests return headers, that tell what the response will be, and the body, that is the response. The headers are required by browsers to understand how to interpret the data that is in the body, therefore no output must be sent before the headers. This error is outputted when headers are sent after some body output has been sent. When working on a Drupal system, there are three common causes to this error that you can debug:

An echo statement in a module/theme (and not in a template). Sometimes developers will echo out a value for debugging purposes, and forget to remove that line.

Blank space before the opening &lt;?php tag in a document on the system. This is usually in a custom module or theme, or can be in settings.php, or settings.local.php.

A closing `?&gt;' tag, with whitespace after it. Drupal coding standards are to not use the closing php tag, so if you find this anywhere outside of a template, you can probably remove the closing tag. At the very least, you should ensure there is NO whitespace after the tag.