Ants have varying tastes depending on the species. Some have attraction to sweet tasting food, others savoury. Generally, if they’re in the garden and not bothering me ie on the lawn, I leave them be. They’ll go eventually. Killing them, or trying to with DIY type poisons can have a detrimental effect.
They say that they kill the colony after the worker ants take the poison back to the nest. I’m not sure if that really works, even if it does, you could end up with an even larger colony as neighbouring ants take over a dying colony (the nests can be massive).
They’re simultaneously a pain and fascinating creatures to learn about.