I wouldn't say inherently. Trying and failing to quit is plainly a failure of willpower on some level, albeit an understandable one given varying levels of nicotine addiction. Perhaps it could also be a failure of information (helpful techniques, etc.), although I'm not familiar enough to comment in detail on what quitting smoking is like.
On the other hand, is picking up the habit in the first place, or choosing not to attempt to quit, a failure of character? I'm not sure that's for anyone other than the individual to decide. I personally feel it's unwise given that in 2024 smoking tobacco is pretty much universally known and accepted to be wildly unhealthy, but if someone weighs the tradeoffs and decides that maybe it has social and/or professional and/or mental benefits for them that outweigh the downsides, I wouldn't call that a character flaw so much as a decision that I'd highly disagree with. I'd say the same whether we were discussing tobacco or meth.
---
Edit: More to the point I now see you were probably getting at, there's a pretty big difference in the knowledge and time/resource investment required to stop buying cigarettes (which costs nothing) and to adopt a low-carb or ketogenic diet that a particular individual would be happy with long-term. I've been keto for over 12 years, and I have a routine that I enjoy, know my way around a kitchen, know what foods I like, and know all the right ingredients and recipes to use to create any food I might want to eat in a keto-friendly form that's as good as or better than what I could otherwise buy at a store or restaurant. For example, I make some of the best ice cream I've had anywhere (sometimes in flavors that I've never seen commercially available), and the one time I cheated for a New York slice I was disappointed because it didn't hold up to the pizza I'd already been making at home.
Maintaining my diet takes zero willpower, because I enjoy it even more than my diet from when I was fat, and I never had to starve myself or give up my sweet tooth. The problem is that for that to work it required not just the inclination to research and adopt keto in the first place (a major hurdle in itself), but turning it into a dedicated hobby with development of knowledge and skills that I wouldn't expect the average person to casually pick up. That may work for me, but isn't a scalable solution for the population at large. On the other hand, if I could magically reformulate every food product in the world based on what I know from experience works, no one would struggle to eat a high-fat diet because that would just be the default instead of high-carb.