In what sense are you asking that question?
If we look at tradition and well accepted ideas of gods, we mainly look at what are now generally considered mythologies and then the Abrahamic faiths.
Ancient mythologies and polytheistic religions in general tend to ascribe natural phenomena to gods, giving a human personality - essentially something more personally relatable - to various things like storms, the sunrise, travel, knowledge, death, etc. It was a device to humanize concepts which were typically beyond human control.
The Abrahamic faiths instead assign all power to a singular God, who is generally worshipped as a source of social order, providing the laws and cultures to follow in order to make a functional society. Through various means, such as promise of salvation or organized charity work, these religions are ultimately far more successful at being an organized religion than the pagan religions. God here is essentially the invented source to which ultimate authority on what is right and wrong is ascribed. A justification for a way of life and a moral system.
In both, gods were invented as a device, either to cite as an authority on something or to explain something beyond human control.
If you're looking for an answer to what qualifies as a god, then the answer becomes pretty subjective.
Must a god be known and worshipped? If so, do we assign an arbitrary number or percentage of humans who need to be worshippers for qualification? And then we have to also question the existence of gods in certain pantheons that just don't really get "worship" despite being recognized in the same class of entities as gods who do get worshipped consistently.
Then also comes the problem of nomenclature. "God" is an English word with a lot of connotations and cultural associations with what the English speaking world generally recognizes a god. But there are a lot of cultures that have ideas similar to gods but don't call them as such. How do we pick and choose what entities within such systems count as gods? There isn't a simple way to distinguish, for example, beings like minor gods from named angels if neither are explicitly called gods or non-gods.
Since all that is pretty subjective and basically impossible to answer, let me just give my own personal thoughts, even if it doesn't provide a satisfying answer:
No matter what, a god is something born of a human mind. By the most all encompassing definition, a god is anything anyone wants to believe is a god. Since we cannot satisfactorily assign some arbitrary qualification for how many people worshipping it are needed to call something a god before it's real, only one person should need to believe in it.
Thus, as long a single person at any point in time genuinely believes something is a god, it is a god - at least to that person in that time.