The answer is forming an identity.
According to Erik Erikson's theory of psychosocial development, the main task of adolescence (which he defines as occurring roughly between the ages of 12 and 18) is the development of a personal identity. This stage is known as "Identity vs. Role Confusion." During this period, adolescents explore different roles, beliefs, and ideas to develop a sense of self and personal identity. Successfully navigating this stage leads to a strong sense of self and direction in life, while failure to establish a clear identity can result in role confusion and uncertainty about one's place in society.
This task is more relevant to the next stage in Erikson's theory, which is "Intimacy vs. Isolation," typically occurring in young adulthood (ages 18 to 40). In this stage, the focus is on forming intimate, loving relationships with other people.
Feeling competent is associated with the earlier stage of "Industry vs. Inferiority," which occurs during childhood (ages 5 to 12). In this stage, children work towards gaining competence and skills in various areas, leading to a sense of industry and accomplishment.
Developing autonomy is the main task of the "Autonomy vs. Shame and Doubt" stage, which occurs in early childhood (ages 1 to 3). During this period, children strive to develop a sense of personal control over physical skills and a sense of independence.