The witr prayer is not obligatory, but it is a sunnah of the Messenger of Allah ﷺ. Indeed Allah is one, and He loves what is odd-numbered.
حدثنا هاشم حدثنا أبو خيثمة حدثنا أبو إسحاق عن عاصم بن ضمرة
إن الوتر ليس بحتم ولكنه سنة من رسول الله ﷺ وإن الله عز وجل وتر يحب الوتر
Its isnad is sahih. Abu Khaythama is Zuhayr bin Muawiya al-Jufi, who is trustworthy and a hafiz. Tirmidhi (2:316 of our commentary) narrated it via Abu Bakr bin Ayyash from Abu Ishaq, and Nasai and Hakim also narrated it. See 761.