Well someone might come along and ask isn’t that judgement hypocritical, aren’t you a junkie?
Well, no - it’s usually a heartfelt plea from a place of painfully hard-won experience trying to help someone else lest they too fall victim.
No different that the teenage “why can’t I smoke, both of you {mom,dad} smoke!” setup that is so common it’s a sit-com trope.
Politics on the other hand is filled with hypocrisy that is far less acceptable, like pretending to care about women while taking away their rights, or pretending to care about the children while opposing any form of gun control or accountability for police.
It's not hypocritical - the junkie considers also his own addiction and habits as bad. It only becomes hypocrisy if he makes an exception for himself, using thin excuses.
To take the example to its limit: "You shouldn't double-park" "But you double-parked!" "Yes, and I shouldn't have, I'm a worse person for doing so, don't follow my example" - that's not hypocrisy. But "Yes but I was in a hurry and parking properly would have been really awkward" - now it is hypocrisy. Especially if they don't allow those excuses when others use them.
Otherwise it's just "pulling up the ladder" after they've climbed it. (Which is a standard tactic for people who "regret" having an abortion but don't put themselves in jail or even adopt a child).