You can easily put an empty bag of chips in your pocket or backpack and carry it with you until you find somewhere to dispose of it responsibly.
With a cigarette butt, it’s difficult. And also it’s very small anyways so it may not seem like a big deal.
The solution is to give up smoking. If you stop smoking then you won’t have any more cigarette butts that you need to get rid of.
One neat thing I’ve seen in some places is a “poll” where they ask a question with two alternatives, and they have people put cigarette butts in the compartment corresponding to their choice. Here, the photos on this website explains it better than words: https://ballotbin.co.uk/
They were a pretty common site in Tokyo until they made outdoor smoking illegal in public areas except in designated areas around the city.
https://www.google.com/search?q=%E3%83%9D%E3%82%B1%E3%83%83%...
What a ridiculous solution. That's like saying the solution to reducing road deaths is to stop driving.
You can see other smokers doing it right when there's a bin nearby too, I've questioned them and never get an answer.
I think many people just live so thoughtlessly and carelessly, the rest of the city is dirty so why should they bother? It's really not much of an effort though.
Now your yard? That's just rude.