Bought a house a few months ago and the previous owner left a wheelbarrow with a flat tire. Was going to get a new tire for it but then I saw a stupid "expanding foam hacks" video on Facebook that auto played and they put foam in a tire to get it "inflated" again. Has anyone done this and had luck with it? Out of curiosity and to save my cheap ass a few dollars.
It might fill the tire and make it round but it probably won't hold much weight. If it does hold weight it would probably be a rough ride to push that thing around anything that isn't smooth ground. A tire patch like @darkwing_duck suggested or a plug would probably give better results.
I'd recommend just going for a new wheel and tire. Harbor Freight or your local equivalent probably has one that will fit with a solid tire under $20 and never having to worry about flats or airing it up is worth it.
There's also a solid chance the tire is really old and doesn't have much life left anyway. By the time you patch it a couple times, you've probably wasted more than $20 of your time.