Cranky is a more wide ranged term , it means strange(in a bad way) and the one who always stays angry and irritated no matter what. So it's a long time term .
He is a cranky person.
Whereas grumpy is used when one is angry or irritated because of something that happened in specific .
Like He was grumpy today because he failed the test.
I hope you understood it. If didn't ask me the queries again. I would be more than happy to help you with it.
And don't have a good day..have a great day . 😊