I've had some success in the past using a combination of dose/frequency charts and the "don't break the chain" approach to building habits popularised by our favourite comedian Jerry Seinfeld.
Don't break the chain just means you mark an X in every day of a calendar and consecutive days form a "chain" of Xes and this becomes a visual reminder of your progress and builds a little dopamine reward loop around sticking with "the thing" and not breaking the chain.
Dose/frequency charts were initially a practicality for tapering / managing a slow withdrawal, but the chart line going down also seemed to have a similar intrinsic motivating influence on my mind and my resolve.
Both of these strats are basically "gamification" tools and they're integrated into (or form the whole function of) most quitting apps, but you don't necessarily need to use an app to use habit forming techniques to break a bad habit.
Find whatever is super convenient and fits into your lifestyle (app or otherwise, check for FOSS apps first) or build simple systems like above, which can work on paper or in a spreadsheet or in a dedicated app that you are comfortable using.
It's actually a bit obnoxious how effective stuff like this can be even with really brutal addictions and I wouldn't hesitate to recommend trying an app if I wasn't also worried about apps and privacy in general.