When you add a Javascript code in the header, it runs before the body. So, in that moment, there is no element with id "addition" yet.
To keep that simple, you should add your script in the bottom of your tag.
<html>
<head>
<title>Hello World</title>
</head>
<body>
<span id="demo"> 5+6 =</span><span id="addition"></span>
<script type="text/javascript">
document.getElementById("addition").innerHTML= 5+6;
</script>
</body></html>
Another option is putting your code in a function and calling that function into the onLoad attribute on the body tag.
<html>
<head>
<title>Hello World</title>
<script type="text/javascript">
function letsDoIt(){
document.getElementById("addition").innerHTML= 5+6;
}
</script>
</head>
<body onload="letsDoIt()">
<span id="demo"> 5+6 =</span><span id="addition"></span>
</body></html>
More info about events order can be found here https://javascript.info/onload-ondomcontentloaded.