Hi . Welcome to HCM
From your description you seem to have severe
dandruff due to increased oily scalp, which gets easily infected by fungus. Sweat and oil can give rise to the bad odour.
Few points to note - do not apply oil, gels, styling products on your scalp as it is already oily.
Wash your hair regularly. Use a shampoo such as arcolane or Ketoz for dandruff on alternate days till the problem reduces and then continue at least once a week. Do not oil after.
You may see similar complaints,
pimples or rashes on other oily areas such as face , chest, upper back.
It can be genetic as its a condition of your skin.
Other options to think of maybe
scalp psoriasis etc, IF it is not releived by the dandruff medication.
Do see a
dermatologist if you see no change after a month.
Hope this helps.