from a couple of years on the stem about (twenty cm. Out of the ground) of tomatoes grown outdoors it dries up, it becomes dark and then the whole plant dies I can tell you what things
from your description it seems that your tomatoes are hit by a fungal parasite, which settles in the stem, causing very serious damage to your crops; if the development of this fungus is very rapid, it is clear that, once it is established, you cannot remedy it, if instead from the appearance of the first spots, until the death of the plant, some weeks pass, you can buffer the problem by supplying the plants a systemic fungicide.
If this disease has been developing for some years, it is clear that the fungus spores are present in the soil, and cultivation on your part suffers from some problems. I state that the development of fungal pests is greatly favored by the excesses of watering, and by the damp environmental humidity. So it's likely that you are watering your tomatoes too much; the tomatoes are among the plants of the garden that need less watering, even if it is advisable to water them regularly, but only when the soil is well dry; in addition to this, it would be useful to water the soil at the feet of the plants, and not the foliage, which otherwise tends to develop various types of problems. In addition to this, if over the years, the same problem occurs in the same plot, I would like to remind you that it would be advisable to avoid planting the same vegetables on the same plot, from year to year; so next year remember to plant the tomatoes in another plot of your garden, just to prevent the parasites that survived the winter from being ready to invade the new plants.
Fungal diseases often tend to develop in very dense plantations, where the plants do not receive the correct amount of direct sunlight, and have an exhaust ventilation; rather than making the plants sick, giving up some seedlings, and laying them home well separated from each other.
Another factor that favors the development of many diseases on tomatoes consists in an excessive quantity of nitrogenous fertilizers; if the soil is enriched with manure, before planting, it is not necessary to fertilize also with humus, or granular fertilizer; wait a few weeks, and a slow release granular fertilizer is supplied, in the correct doses, better if this fertilizer also contains microelements, such as boron, calcium, iron, manganese.