That I can explain easily.
" Welcome to " is a child of this span. You see this by watching your HTML code.
<span> everything inside angle brackets > and < is a child of the surrounding HTML element.</span>
When you access the span via
const mySpan = document.getElementsByClassName('1234124655G')
You get an array with at least the span from above inside.
In your browser, you can run console.dir(mySpan) to see the structure of this array. You'll quickly spot that the span has some children of its own. console.dir(mySpan[0].childNodes) returns a list with three elements inside - a text element, a strong element and again a text element. The first text element holds your desired text.
console.dir(mySpan[0].childNodes[0].data) // " Welcome to "
console.dir(mySpan[0].childNodes[0].nodeValue) // " Welcome to "
console.dir(mySpan[0].childNodes[0].textContent) // " Welcome to "
console.dir(mySpan[0].childNodes[0].wholeText) // " Welcome to "