Two applications, in order
The temporary authorisation to stay is requested while you are still abroad. Only after it is granted do you enter Luxembourg and apply for the residence permit for salaried workers.
The long-term route opens after 5 years of residence.