difference between .textContent and .firstChild.data

assuming I have a html, with an h2, what’s the difference between

document.querySelector('h2').textContent = 'abcdefg';
<h2>
</h2>

and

document.querySelector('h2').firstChild.data = 'abcdefg';
<h2>
</h2>

?

I’m mainly interested in knowing what this .data is, I didn’t find the documentation for it