You are really close, and the wording of the test has the answer for what it is looking for:
4. Each <section> element with the class of "main-section" should also have an id comprised of the <header> innerText contained within it, with underscores in place of spaces.
So it is looking for every section to look like: <section class="main-section" id="****">
You just need to move the id tags from the header and into the section tag to get the test to see them.