Check voice settings in steam men
I had the same problem as you previous. My mic worked on teamspeak, discord, facebook etc but not ingame CS.
I was struggling with this problem quite a long until I found out that I had extension cord on my mic and that was the reason why it didnt work on CSGO. If you have extension cord in your mic try to remove it.