Praise be to Allah.
Fasting six days of Shawwal is dependent upon having completed the Ramadan fast, according to the correct view. This is indicated by the words of the Prophet (peace and blessings of Allah be upon him): “Whoever fasts Ramadan then follows it with six days of Shawwal, it will be as if he fasted a lifetime.” (Narrated by Muslim, 1164)
The conjunction thumma (then) indicates that this must be done in this order. This indicates that the fast of Ramadan must be completed first (by observing the Ramadan fast and making up any missed fasts), then after that one may fast the six days of Shawwal, so as to attain the reward mentioned in the hadith.
The one who still owes missed Ramadan fasts is said to have fasted part of Ramadan; we cannot say that he has fasted Ramadan.
But if a person has an excuse that kept him from fasting the six days of Shawwal in Shawwal because he had to make up missed fasts – such as a woman who was bleeding following childbirth and spent all of Shawwal making up for Ramadan – then she may fast six days of Shawwal in Dhul-Qa'dah, because she was excused.
Similarly for anyone who has an excuse, it is prescribed to make up the six days of Shawwal in Dhul-Qa'dah, after making up the missed Ramadan fasts . But the one who lets the month of Shawwal go by without fasting these days and with no excuse, will not attain this reward.
Shaykh Ibn ‘Uthaymin was asked: What if a woman owes days from Ramadan – is it permissible for her to give precedence to fasting the six days of Shawwal over making up the days she owes, or should she give priority to the days she owes over fasting the six days of Shawwal?
“If a woman still owes days from Ramadan, then she should not fast the six days of Shawwal until after she has made up what she owes, because the Prophet (peace and blessings of Allah be upon him) said: “Whoever fasts Ramadan then follows it with six days of Shawwal…” Whoever still has days to make up from Ramadan has not fasted Ramadan, so she will not attain the reward of fasting the six days of Shawwal until after she has finished making up the days she owes. If we assume that this making up missed fasts lasts throughout Shawwal, such as if a woman was bleeding following childbirth and did not fast at all in Ramadan, then she started to make up her missed fasts in Shawwal and did not finish that until Dhul-Qa’dah began, then she may fast the six days, and she will have the reward of one who fasted them in Shawwal, because she delayed it for a necessary reason, so she will have the reward.” (Majmu’ al-Fatawa, 20/19)
In addition to that, it is obligatory to make up missed fasts for the one who had an excuse, indeed that is part of this pillar of Islam. Based on this, hastening to do it and to discharge this duty takes priority over doing actions that are mustahabb .
And Allah knows best.