In simplified words, it's a screen recording software that also lets you stream to twitch and other streaming portals. In practice it does way more than that though.
Sadly, most people just scratch the surface of what OBS can really do. If you really want to dig in to it, it is has the capabilities of a TV Broadcasting Studio for the financially constrained yet fanatically devoted to the cause level of features. I have used it in place of a TriCaster. I find myself constantly amazed at the things that can be achieved with this software to the point that I shake my head and think this shouldn't be possible. And then grin as other people think it was done in a studio.
So, yes, this thing can make a text document.
"Open Broadcaster Software" -> https://obsproject.com
Why Microsoft decided to put this functionality only in the Game Bar (and not also in, say, the Snipping Tool) is anyone's guess...
XSplit emerged slightly before OBS Classic but OBS innovated with a far superior game capture implementation on Windows, supporting shared texture hooking across D3D8-D3D11 and OpenGL, which helped it gain massive traction with the Twitch crowd. After retaining a large user base it was eventually rewritten as the cross-platform OBS Studio.
But desktop usecase, OBS is pretty much a gold standard.