Structure, not styling.
WHAT HEADINGS ARE FOR
Describing the structure of a page. A screen reader user navigates by them, jumping between sections.
A page with no headings, or with headings that describe nothing, is difficult to navigate.
THE RULES
One main heading stating what the page is about Subheadings for sections, in order
Do not skip levels: a level two followed by a level four is a gap
CHOOSING THEM FOR STRUCTURE, NOT APPEARANCE
The most common mistake is picking a heading level because it looks the right size.
If you want smaller text, style it. Do not change the level.
WRITING THEM
Descriptive. "How much it costs" rather than "Investment".
Someone hearing only the headings should understand the page's shape.
WHY IT HELPS EVERYONE
Sighted visitors scan headings too. Clear structure helps them find what they need.
Search engines use them to understand content.
TESTING
Use a browser extension that lists the headings on a page.
If the list makes no sense, the structure is wrong.