Music theory is absolutely an indispensable tool for musicians and composers. You can play music without it, but that’s just putting an unnecessary upper bound on what you can achieve.
More than anything, it’s a vocabulary to talk about the thing you’re doing with others.
Music's theory is something you really need to understand at an unconscious level. All the study of how the notes relate and frequencies, that's very interesting and it may help you understand things better, but the real question is not, can you do all the math to figure out why this note and that note work together, it's can you hear it with your ears and play the correct harmony note for whatever purpose the music leads.
I doubt there is any composer that actually is relying on music theory for their compositions. They may occasionally have something finished, but 'it doesn't sound right'. Then go back to music theory and say, oh, this chord is wrong. I can fix that chord because I know music theory and come up with something that works. But they're not doing that at first. They're composing from their unconscious mind.