The Apostle of Allah ﷺ said: When any one of you leads the people in prayer, he should be brief for among them are the young and the aged, the weak and the sick. But when one of you prays by himself, he may (prolong) as he likes. (Using translation from Muslim 467a)
أَنَّ النَّبِيَّ ﷺ قَالَ إِذَا أَمَّ أَحَدُكُمُ النَّاسَ فَلْيُخَفِّفْ فَإِنَّ فِيهِمُ الصَّغِيرَ وَالْكَبِيرَ وَالضَّعِيفَ وَالْمَرِيضَ فَإِذَا صَلَّى وَحْدَهُ فَلْيُصَلِّ كَيْفَ شَاءَ