How should I get him back?

So recently I wasn’t aware that my guy friend was hurt by something I had said to him awhile ago. His cousin told me he was deeply hurt but somehow he didn’t want me to know. His cousin thought it would be best if I did know since I’m an understanding person.

But also, why would he only tell his male friends and cousin about what was wrong but couldn’t come to me? I get he’s upset but he could’ve tried telling me, cause he know me well enough that I wouldn’t hurt his feelings on purpose.

And I don't know how to go up to him and apologize without him knowing his cousin told me which was supposed to be kept between them.
How should I get him back?
Post Opinion