Denis described everything correctly, I will try to answer this question with an example. Indeed, Cortisol and Adrenaline are related hormones that are secreted by the adrenal glands. Cortisol, also known as "stress hormone", protects our body in times of danger and is produced spontaneously under stress. Adrenaline is produced when aroused. These concepts are very close, but there is still a difference. For example, if you decide to go diving for the first time, jump with a parachute, conquer Everest - at this moment you will feel fear, and your adrenal glands will produce cortisol. But, if you are already an experienced diver and are planning your next dive into the beauty of the ocean, most likely you will experience a feeling of anticipation and excitement - at this moment Adrenaline comes into play: you forget about food, and a pleasant warmth spreads through your body.
You asked a good question. Both adrenaline and cortisol are stress hormones, but each has its own niche, so to speak.
I'll start a little from afar. The human body consists of systems that ensure its livelihoods: the digestive system provides energy, building material; the urinary system cleans the body of unnecessary metabolic products, the reproductive system ensures reproduction, etc. But there are two systems - nervous and endocrine, whose function is integrative. Well, that is, they transform all this our liver and a set of cells into a whole-functioning organism. At the same time, the endocrine system is responsible for long and fundamental somatic processes (puberty, growth, etc.), and the nervous system is responsible for the momentary response to a change in environment. Naturally, these two systems are intertwined, affect each other, and also join at some points. An example of a docking point may be the pituitary gland, part of which is neuro- and part is endocrine. Exactly the same example can be the adrenal glands, which are essentially two different organs, but which are anatomically united.
So, adrenaline, which is produced by the adrenal medulla, is a kind of intermediate neurohormone. His task is immediate and quick response to an unplanned stressful situation. It quickly stood out, provided the necessary reactions of the body, and quickly disappeared.
Cortisol, which is produced by the adrenal cortex, is already a classic hormone, it is responsible for planned stress (for example, waking up in the morning - the transition from sleep to wakefulness - this is planned stress By the time of waking up, the body produces cortisol ahead of time). Another example of routine stress is childbirth. Childbirth for the fetus is generally the most severe stress in life, so the adrenal cortex of the fetus in the last stages of pregnancy is a huge formation. Cortisol is vital in such situations, and in very large quantities. Well, and further, other long-term stresses up to colds - all this requires increased amounts of cortisol to help the body cope with the situation.
PS I've simplified my explanation here, and wrote so much (thanks for reading ), so I apologize for some primitivism.