No, you do not have to fast six days in a row for Shawwal. Rather, it is preferable to split the fasts up according to the Hanafi Madhab.
عَنْ أَبِي أَيُّوبَ الْأَنْصَارِيِّ رَضِيَ اللهُ عَنْهُ، أَنَّهُ حَدَّثَهُ، أَنَّ رَسُولَ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: مَنْ صَامَ رَمَضَانَ ثُمَّ أَتْبَعَهُ سِتًّا مِنْ شَوَّالٍ، كَانَ كَصِيَامِ الدَّهْرِ
Umar bin Thabit narrated that (Sayidina) Abu Ayyub al-Ansari (May Allah Most High be pleased with him) informed him that the Messenger of Allah ﷺ said, ‘A person who observed the fast of Ramadan and then followed it with six (fasts) of Shawwal, will be as if he fasted perpetually.’ (Sahih Muslim, 1164 – 204).
The blessed Hadith above clearly encourages fasting six days in Shawal. However, it does not speak about the six days being consecutive or not. Therefore, it is certainly not a condition to make them consecutive. Rather, the Hanafi scholars preferred that they be spread out and not consecutive.
وَنُدِبَ تَفْرِيقُ صَوْمِ السِّتِّ مِنْ شَوَّالٍ) وَلَا يُكْرَهُ التَّتَابُعُ عَلَى الْمُخْتَارِ خِلَافًا لِلثَّانِي)
(قَوْلُهُ عَلَى الْمُخْتَارِ)
قَالَ صَاحِبُ الْهِدَايَةِ فِي كِتَابِهِ التَّجْنِيسُ: إنَّ صَوْمَ السِّتَّةِ بَعْدَ الْفِطْرِ مُتَتَابِعَةً مِنْهُمْ مَنْ كَرِهَهُ وَالْمُخْتَارُ أَنَّهُ لَا بَأْسَ بِهِ. (رد المحتار على الدر المختار)
(Imam al-Haskafi): And it is recommended to separate the six fasts of Shawwaal. To make them consecutive is not Makruh according to the chosen opinion, as opposed to the second (Imam Abu Yusuf).
(Imam Ibn Abideen): His saying ‘according to the chosen opinion.’ The author of al-Hidaayah said in his book al-Tajnees: As for fasting six days after (Eid) al-Fitr consecutively, there are those that considered it to be Makruh. However the chosen opinion is that there is no harm in it. (Radd al-Muhtar).
As seen in the Nass (text) above, it has been considered Makruh by some Hanafi scholars to fast the six days of Shawwal consecutively. Although this is not the sound opinion in the Madhab, it is still preferred to split the days up and not fast consecutively.
And Allah Most High Knows Best.
– Answered by Shaykh Noorud-deen Rashid (04.05.2022)
Is there a Hadith that says fasting six days after Eid gives you the reward of fasting a year?
See also (video):