Color blindness is a defect in your ability to perceive different colors. I don’t think glasses are able to solve the issue as they are mostly used for vision correction, not for color blindness.
People who need glasses because they have a problem with the shape of their eyeball and the glasses help compensate for that defect by changing how the light travels to the eye and bringing the distant object into focus. This has nothing to do with not being able to see colors.
Honestly, glasses cannot be helpful for color blindness. But you will still need to wear them if you have other vision issues such as nearsightedness, farsightedness or astigmatism. You’d better ask for professional advice for color blindness from the doctors.