We dont really know what consiousness is, so for the time being it's left in the air. I think sabine hossenfelder did a video on this topic some time ago.
This is only a problem because don't clearly define what they mean by the word.
If someone is talking about the capacity for people to think, as in process information from their senses, neurology has explained much of that.
Generally when it's treated like a mystical phenomena that can't be explained it's because people want an answer to some vague sense that something else is going on. They feel like there's more going on, but can't specify what there is to be explained other than this feeling.