Neither. It's an expected social requirement. Failure to act and speak modestly shows a lack of nous.
Real geniuses are genuinely modest.
The rest of the population varies enormously from lack of confidence to over-weaning. Whether the self-assessment is realistic is another matter. It's common for humans to have blind spots and unrealistic views about the self. Ego and unconscious issues get in the way.
I think bragging is a sign of weakness. It shows us how little self-esteem and self-confidence the person has. He has to blow his own horn because no one else will. How is that a strength? So we disagree a bit. No worries. Thank you for your reply bw.