One thing you can ask yourself “would I eat a healthy version of what I want?” If no, then you’re just having a craving.
For instance, if you were wanting something sweet like a chocolate, ask yourself “would I be okay eating an apple?” If not, then likely a craving. If yes, then you’re likely hungry