DOM doesn't work on Node.JS?

So, I’m trying to add some of my own ideas to the Mixed Messages Portfolio Project on the Full Stack path. One such idea includes adding .html and .css to add some design. I wanted to include a button for interactivity, but while writing js code(using the DOM) for manipulating the HTML, VSCode returns an error saying that the “document is not defined”. I assume this might be an issue with Node.js specifically? But I have no idea how to work around this issue! Any input sincerely appreciated

Have you set up Node locally?
This is the link if you haven’t do it yet →
StackOverflow solution → javascript - Node.js document is not defined - Stack Overflow