The Prophet ﷺ saw an old man walking, supported by his two sons, and asked about him. The people informed him that he had vowed to go on foot (to the Kaʿba). He said, "Allah is not in need of this old man's torturing himself," and ordered him to ride. (Using translation from Bukhārī 1865)
ﷺ مَا بَالُ هَذَا؟ قَالُوا نَذَرَ يَا رَسُولَ اللهِ أَنْ يَمْشِيَ قَالَ إِنَّ اللهَ ﷻ عَنْ تَعْذِيبِ هَذَا نَفْسَهُ لِغَنِيٌّ وَأَمَرَهُ أَنْ يَرْكَبَ فَرَكِبَ