How can meditation help with desire or craving?
The way to approach a craving or habit with mindfulness is to not be attached to results. For example, we don't want to be meditating in order to change or fix ourselves because this only ends up being a form of self-judgment or policing ourselves, which ultimately results in an inner rebellion and falling back into the habit.
So the trick is to get curious about what's going on for you when you have a craving. When you notice you're wanting something like a drink or a snack, see if you can really allow that craving to be there for a little while, just to see what exactly that pull feels like. You don't have to fight with yourself and force yourself not to have the thing—rather, just pause with that feeling in order to understand and learn about it. Check to see if there's something going on that you're not wanting to feel, either emotionally or physically. Often when we reach for something pleasant, it's in order to avoid having to feel something—boredom, restlessness, anxiety, grief... the list goes on. So check to see, "Is there something I'm not wanting to feel?"
If so, see if you can go ahead and feel that feeling with kind attention. Again, the goal shouldn't be so that you don't have the thing you want in the end. It's just to get a little more clarity around what exactly is going on when a craving arises. When you greet your deeper feelings and needs with kind attention, you start to address the root of the problem.
After doing this, you might check to see if you still want to have that pleasant thing. If you do, there's nothing wrong with that! It doesn't so much matter whether or not you go for the thing, what matters more is that whatever you do, you bring kind, mindful attention to it.
In the app, you might like to explore the Healthy Habits course which has much more guidance on this topic. Dr. Judson Brewer’s Mindful Eating course also has a lot of meditations related to craving that you might find helpful.