I've sprouted Mary thistle indoors before, in my kitchen's south windowsill, but only to transplant it outside after it got to a few inches tall. That works fine. However, my observation and guess is you would probably want growlights to get a good, healthy plant with flowers. If you're just growing it for microgreens or something, then growing indoors is fine. Germination was pretty sporadic for me, though (they didn't all sprout at the same time). The leaves tasted like lettuce indoors or out, but they're more tender and less crinkly with low light such as is found in the shade or partial shade outdoors or in a bright windowsill.
Thistles do attract certain pests, including aphids, slugs, and weevils. I've never seen pests on them indoors, but I imagine they might be an issue. The weevils come when the buds/flowers come.
I wouldn't discourage you from attempting to grow a thistle indoors, though. You never know: my guess could be wrong. But yeah, give it as much light indoors as you can. If you're not using growlights, that means a south window, usually.