Please apply for a residence permit or EU Blue Card during the term of validity of your visa.
Your application should be submitted 4 to 6 weeks before your visa is scheduled to expire.
The best thing is to book an appointment online in a timely manner.