The Sarayu River is important to the story of Ayodhya since it saw Lord Rama's life during his banishment and return to Ayodhya.
The Padma Puran narrates the greatness of the river. The Bhishma Parva of the Mahabharata also has a reference. Tulsidas presents Sarayu as the primary identity of Ayodhya.
Sarayu is a Vedic River as mentioned in Rig Veda. The Puranas state that Sarayu appeared from Lord Vishnu's tears.
The demon Shankasura stole the Vedas and threw them into the sea & Lord Vishnu assumed the form of Matsya (fish) avatar, killed the demon, & handed the Vedas to Lord Brahma.
Lord Vishnu's eyes shed tears of joy. Brahma took those tears to place them in the Manasarovar. Maharaja Vaivasvata extracted this water using an arrow which became the Sarayu.
It originates from the foothills of the Himalayas & becomes an auxiliary river to the Sharada. Sarayu on Earth appeared before the Treta Yuga to see childhood Lilas of Lord Ram.