When “God” is the name of a god, as in Judaism, Christianity and Islam (“Allah” is just Arabic for “God,” and many modern Muslims translate the name when writing in English), it needs to be capitalized like any other name. When it is used as a generic term, as in “He looks like a Greek god,” it is not capitalized.

If you see the word rendered “G*d” or “G-d” it’s not an error, but a Jewish writer reverently following the Orthodox prohibition against spelling out the name of the deity in full.