Alright, I've been down a rabbit hole on this lately, and the origins are a lot less straightforward than some modern fantasy makes them out to be. Nyx is genuinely one of the oldest deities in the Greek tradition, a primordial goddess of the night itself. She's there right at the start in Hesiod's 'Theogony', born from Chaos, alongside Erebus (Darkness), and then she goes and gives birth to a whole bunch of powerful and frankly terrifying figures like Hypnos (Sleep), Thanatos (Death), the Moirai (Fates), and the Oneiroi (Dreams).
What's always fascinated me is how she's portrayed with this unique mix of respect and fear. She's not anthropomorphized like the Olympians lounging around on Mount Olympus; she's a cosmic force. There are very few cults or temples dedicated to her because you don't really worship the night—you acknowledge its inevitable power. Homer, in the Iliad, even has Zeus himself wary of crossing her, which says something when the king of the gods is nervous.
I think the modern conflation with Erebus gets people mixed up. He's the darkness within the night, a more abstract male consort. Nyx is the encompassing presence. Later artistic depictions sometimes show her with a dark veil and stars, but those are Roman-era additions. The original Greek conception was probably far more intangible and awe-inspiring, a foundational piece of the universe's architecture.