Question is not phrased correctly....God invented both dark and light and he had to create nothingness with which to contrast somethingness?
The Bible says he created all things...even nothingness!
Dark is the absence of Light, Cold is the absence of Heat, Nothing is the absence of anything. God did not invent dark or nothing. They are the absence of God. God is the source of light, heat and everything.
Isaiah 45:7 says: “Forming light and creating darkness..I am the LORD that does all these.