The Messenger of Allah ﷺ used to perform the witr prayer with thirteen rakahs. When he grew older and weaker, he performed witr with nine.
أخبرنا أحمد بن حرب قال حدثنا أبو معاوية عن الأعمش عن عمرو بن مرة عن يحيى بن الجزار
كان رسول الله ﷺ يوتر بثلاث عشرة ركعة فلما كبر وضعف أوتر بتسع