With the special instruction document.getElementById(), we can use a tag's ID to find and access it in the script.

Add document.getElementById() along with the ID of the heading.

<html><body><h1>Soccer team ratings</h1><h2 id="winner">Liverpool</h2><p>This team has an overall rating of 7.01.</p><h2 id="loser">Lyon</h2><p>This team has an overall rating of 6.91.</p><script>var heading = document.getElementById("winner");
console.log(heading);</script></body>
</html>]]>

Make sure to assemble .getElementById("winner") in your code.