A keyword in a heading still helps when it belongs there naturally, but forcing it into every heading is overdone and reads as spam. The useful part and the harmful part live in the same practice, separated by whether the keyword fits. A relevant term in a heading aids clarity for the reader and gives a mild relevance signal to search engines. The same term jammed into heading after heading stops helping and starts working against you, because it makes the page read like it was written for a crawler instead of a person.
The help comes from relevance, not repetition. When a heading naturally contains the topic phrase because that section genuinely covers it, the heading tells both the reader and the search engine what the section is about. That is honest signal, and it costs you nothing in readability because the word was going to be there anyway. A heading that accurately names its subject tends to include the relevant terms on its own, which is exactly the outcome you want.
The harm comes from forcing. The old reflex of putting the target keyword in every single heading produces a page where the same phrase echoes down the left margin in a way no human would write. Search engines have long since learned to discount that pattern, and readers feel it as awkward and repetitive. You gain no extra ranking from the fifth identical heading, and you lose trust and clarity. Stuffing the keyword everywhere is the overdone half of the answer, plainly.
So the line is simple to hold. Let the keyword appear in a heading when the section is actually about it and the phrasing reads naturally, and let other headings describe their sections in whatever words fit best, even when that means the keyword does not appear. Variety in heading language is a feature, not a failure; it shows the page covers a topic from several angles rather than chanting one phrase.
When you draft your headings, write each one to describe its section as clearly as possible first, then check whether the keyword landed naturally where it fits. Keep it where it reads well, and resist adding it to headings where it does not belong.