Giving money, giving food, buying or taking for a meal, offering to pay for the gas that is actually put in the tank, offering to put them in touch with the appropriate charity if applicable, or if none of these can be done, the very minimum is to pray they receive the help they need.
For various reasons as others have expressed above it is not always wise to open your wallet and/or give money. Whilst we shouldn’t judge with a wide brush, I think using prudence in every situation is what most of us do. The Bible passage that comes to mind here is when Jesus says ““Behold, I am sending you like sheep in the midst of wolves; so be shrewd as serpents and simple as doves”, which can also apply here I think.
IMO, in these circumstances it can mean to rightly judge the situation (shrewdness), but remain innocent (not turn away/ignore without offering some form of assistance) - pray, donate money or food as appropriate etc.
Even if the amount of money you give to the person is only enough to by one glass of wine - and I see no problem with that - it is the fact, that if everyone donated say $4, then it all adds up to being able to purchase more - a cask of wine instead of a single glass or even drugs. And I don’t wish to be an enabler of anyones (from a Catholic perspective) immoral activity - getting drunk or drugged with possibly resulting in an overdose.
This is how I see this issue, though everyone else will naturally judge the situations they come across as they deem appropriate.