Is it useful to destroy ant nests? If yes, how?
An ant nest in the vegetable garden does not automatically need to be destroyed. First check whether the colony is causing a real problem or simply going about its normal activity.

Ants are part of the garden ecosystem
Ants live in organised colonies and move soil as they dig galleries. They collect food, including other small invertebrates, and interact with many garden species. Their presence alone is not evidence that a crop is being damaged.
Why ants visit aphids
Ants collect the sugary honeydew produced by aphids and may protect them from predators. If you see repeated ant traffic on a plant, inspect its tender shoots and the undersides of leaves. Check for aphids before deciding what needs attention.
Deal with the observed problem rather than assuming every ant is a pest. A vigorous plant with a few aphids may need only monitoring; heavy infestations call for a closer assessment.
Reducing nuisance around plants
When excavated soil covers a small plant, gently clear it away and check that roots remain in contact with the soil. Keep watering suited to the crop. In pots, inspect the root ball if a plant repeatedly wilts or soil is being displaced.
Claims that coffee grounds, eggshells or aromatic herbs reliably drive a colony away should not be treated as guarantees. Avoid pouring salt or improvised mixtures into growing soil.
Is destroying the nest necessary?
Leave an undisturbing nest alone wherever possible. Destroying one colony does not prevent another from settling there. If a nest creates a specific access or safety problem, identify the species and seek a solution suited to that situation. Boiling water can injure plants and soil life as well as causing burns, so it is not a selective method for killing only a queen.