Assalam’aleykum, I pray this finds you in the best of states.
Jazakum Allah khayr for your question!
Who Is Mahram?
A Mahram is someone with whom marriage is permanently unlawful.
This (permanent prohibition of marriage) is established in three ways: By kinship (qarabah), foster relationship (radha’a) and relationship through marriage (sihriyya).
Except if your male cousin is also your foster-brother you will have to cover yourself in front of him because you are allowed to marry him. He is not your mahram. [Lubab]
One should remember that this is only when breastfeeding takes place in the period designated for it, which is two years. [Lubab]
For more details please see: https://seekersguidance.org/answers/hanafi-fiqh/who-is-mahram/
And Allah knows best.
I hope that the above answers your question. If something is unclear please do not hesitate to ask again.
May Allah Most High grant you the best of this world and the next. Please keep us in your du’as!
[Ustadh] Sufyan Qufi