Both kinda, they have different scripts because they have so many homophones. Japanese has far fewer phonemes (possible sounds) compared to english, this combined with the fact that you usually can't have two consonants together without a vowel in between makes it so the amount of possible words is very limited. Because of this if you used just the "phonetic" script hiragana ( each character represents a sound) then it would get confusing since かみ that represents the sound "kami" would be confusing as to what you're referring to. So they mix in kanji, Chinese characters where a character represents a thing, to distinguish these homophones.
Both kinda, they have different scripts because they have so many homophones. Japanese has far fewer phonemes (possible sounds) compared to english, this combined with the fact that you usually can't have two consonants together without a vowel in between makes it so the amount of possible words is very limited. Because of this if you used just the "phonetic" script hiragana ( each character represents a sound) then it would get confusing since かみ that represents the sound "kami" would be confusing as to what you're referring to. So they mix in kanji, Chinese characters where a character represents a thing, to distinguish these homophones.