Gita was sung by Lord Krishna in the battlefield of Kurukshetra to guide His beloved Arjun and help him understand his duties. It was Arjun’s duty to fight for Dharma. So Gita was a dialogue between Shri Krishna and Arjun which was written later by Shri Ved Vyasji. Gita is part of the great epic Mahabharat.
In ancient times, there was no paper or printing press. So what was said or preached needed to be remembered by the listener. The listener was also capable of remembering what had been said.
When we were babies, we did not know how to speak. We also did not understand our mother tongue. However, we listened to what our mother was saying, remembered and learnt. It is not like we learnt to speak all the words in school. We learnt to speak at home further to listening to what everyone was saying. For example, this is water, this is a table etc.
Thus, we would remember after listening. Writing and paper were introduced later, followed by printing press.
As far as Shri Ram Charit Manas by Goswami Tulsidasji is concerned, the original book exists, written by Tulsidasji. Some pages of this book have been preserved having been over 450 years since it was written. Shikshapatri written by Swami Sahajananandji Maharaj has also been preserved.
However, for Gita from the extremely ancient times, Ramayan written by Valmikiji, or Shrimad Bhagavat, the original book may not be available any more. People listened to them and remembered. They then taught this to their disciples. Thereafter, this was written and then sent to printing press.
This is why mantras are called Shruti. They must be heard and then remembered. We also learnt in school in this manner despite there being books. You may have a book but you will have to learn from a Guru how to pronounce and recite the mantra correctly.
Thus, these scriptures were maintained through remembering them and then written later. The original versions may not be obtainable, except Shri Ram Charit Manas and Shikshapatri.