what traits of elf are the role and what is only the traits of the elf?
The reallife archetype of an elf (alfar, faerie, etc) is:
Fate, magic, beauty, and mythical human.
Their role in a D&D setting can vary.
Because the elf is immortal, and can be world alteringly powerful, I tend to remove the epic level ones away from the daily life of a setting, farther away in the sky, deeper in the feywild, wherever. Indeed, the D&D age of 100 for adulthood is when elf culture expects an elf to relocate to alfheimr, or wherever. They still care about and interfere with the fates of humans, but do so from a more big-picture perspective.
The elven communities that humans are more likely to encounter, are opportunities to explore what magical utopias, even magi-tech, might look like. TV shows like Start Trek, Orville, Moonhaven, and so on can inspire ideas.
Elves are generally Good, but because of prescience can do horrible things for reasons that others are unaware of. So they can feel Neutral, Unaligned, or inscrutable.
Notably, while they can meddle in the fates of human individuals (rarely groups), the elves also meddle in each others fates. Be sensitive in roleplay, but a trope is, one elf causes an other elf to fall in love or suddenly become wizened with age, or some other fate, in a way that will significantly impact the future of many people, including human individuals.
As fates, humans often seek prescient advice and aid from elves. The assistance usually leads to life altering events, perhaps especially when the assistance initially appeared trivial or unrelated.
The British faeries personify fertile soil whence vibrant plantlife, especially forests, that are magical realms.
The Norse alfar personify sunlight, especially in the sky above the clouds, counting the skydome as their roof, and the sun as their radiance.
At the same time, they have humanlike cultures and can reside in magical buildings.