什(shén)么(me) means ‘what’ and 怎(zěn)么(me) means ‘how’.
When matching with verb, the syntactic structure of 什(shén)么(me) is ‘V+什么’ while the structure of 怎(zěn)么(me) is ‘怎么+V’. For example,
1)中午你吃什么?
Zhōngwǔ nǐ chī shénme
Noon you eat what
‘What do you eat at noon?’
2)螃蟹怎么吃?
Pángxiè zěnme chī
Crab how to eat
‘How to eat crab?’