"God" is a convenient place holder to fill in gaps. If you believe the Abrahamic religions it had been told to you what it is. But before monotheism there was polytheism. The god idea was not so standard as the one guy who did it all.
If we encountered a far more advanced civilization than us from another solar system they would likely seem "godlike" to us. God wasn't lonely and created man. Man was lonely and created God. Its a blanket answer to "I don't know" or "I don't understand". An interesting exercise in imagination it has been hijacked to be more than a myth and gap filler.