"Modest" is literally the opposite of "proud," and "proud" literally means "swollen," like a rooster's comb. However, "proud" usually means a feeling of superiority and a willingness to show it.
"Modesty" means not bragging or flaunting your wealth or achievements.
"Humble" means "low in social rank, poor, unpretentious." Because people are usually not proud of having a low social rank, humble people are usually modest.
A rich person who owns huge opulent homes, let's say hypothetically in places like Manhattan, Palm Springs, Palm Beach, Palm Springs and Rancho Palos Verdes constantly says things like "I am really rich" is neither humble nor modest. (I'm making a joke about U.S. politics but I won't explain it).
A rich person who lives in a small house, drives a mid-range car, and makes big anonymous donations to charity is not humble, but is modest.