Before you do an activity, whether with craving or without, see the Impermanence of it, play the sequence in your head. Doing this will let you see dependent origination, which results in steam entry.
Say grabbing something to eat when you’re not hungry, or playing video games, or browsing the web.
What does it always start with? Boredom aka discontent for the present moment.
From this point you have two options, endure the boredom, or engage in distraction (web, video games, food, etc…)
If you choose distraction, congratulations, you have chosen to suffer. Why? Because you can’t solve discontent/boredom by ignoring it. Hence, now you have just started the first chain in dependent origination: ignorance.
If instead you chose to endure the boredom, then you would have to develop sense-restraint, which results in overcoming the 5 hindrances, which results in knowledge and vision, which results in freedom and liberation.
But if you choose the path of distraction aka ignorance, then suffering must follow.
Now the intention arises (sankhara, nama-rupa) which results in the 6 senses of the body to make contact with the object of distraction, which results in feelings, cravings, attachment, becoming, birth, aging, death.
So whatever object of distraction/ignorance you choose, the process always begins/is born, and comes to an end/dies. Thus, you haven’t solved your root misery, boredom and discontent, and you’re back to square one.
As long as you remember whatever is born must die, whatever arises must cease, any attempt at distraction/ignoring/ignorance can only be further Suffering.
If you contemplate this before you do any activity, this is what is called contemplating the drawbacks, contemplating the birth and death, and that everything must come to an end and it thus futile to start the distraction, then you will become dispassionate and not start that activity, you will avoid (re)birth.
edit: to add, anything that goes down the path of distraction/ignorance is unwholesome. So in the context of the precepts: killing people doesn’t solve your discontent, lying, gossiping, cruelty, stealing, cheating, sex, alcohol, drugs, doesn’t solve your root misery and discontent.