die Hauptrolle
leading role
The most important and central role for an actor in a film, play, or series.
Er wurde für die Hauptrolle in dem neuen Actionfilm gecastet.
He was cast for the leading role in the new action film.

leading role
Loading your saved state.
leading role
The most important and central role for an actor in a film, play, or series.
Er wurde für die Hauptrolle in dem neuen Actionfilm gecastet.
He was cast for the leading role in the new action film.

The word is made up of 'Haupt' (main, chief) and 'Rolle' (role). So it literally means the 'most important role'.
Die Besetzung der Hauptrolle war eine große Überraschung.
The casting of the leading role was a big surprise.
'Hauptrolle' (leading role) is almost always used with the verb 'spielen' (to play). The expression 'eine Hauptrolle spielen' (to play a leading role) can be used both literally and figuratively.
Welche Schauspielerin spielt die Hauptrolle?
Which actress plays the leading role?
In the context of film and theater, 'Hauptrolle' (leading role) is often combined with verbs such as 'bekommen' (to get), 'übernehmen' (to take on), 'besetzen' (to cast), or 'spielen' (to play).
Sie hat die Hauptrolle in einem neuen Musical bekommen.
She got the leading role in a new musical.
You can recognize the figurative meaning when an abstract thing (such as money, time, or safety) 'plays' the role. In that case, it is not about a person in a film or play.
Bei der Berufswahl sollte nicht nur das Gehalt die Hauptrolle spielen.
When choosing a career, salary should not be the only thing that plays the leading role.
factor
'der Faktor' and 'eine Hauptrolle spielen' can both express that something is important for a situation. 'Faktor' means one influence among several that helps determine a result. 'Eine Hauptrolle spielen' is stronger: it means that something is especially important or decisive. Learners may confuse the words because both have to do with influence. A practical tip: a factor can be small or large; whoever or whatever 'eine Hauptrolle spielt' is at the center.

Bei der Entscheidung spielte der Preis die Hauptrolle.
Price played the leading role in the decision.
Stress ist ein Faktor, der die Gesundheit beeinflussen kann.
Stress is a factor that can affect health.