Basically there are many different "Buddhist canons". The earliest is the Pali Canon, and some people think that they are essentially unchanged since the first Great Council held after the Buddha died. If we can rely on the accuracy of memory of the monks then these sutras may even include words spoken by the Buddha almost word for word.
It's trickier than for the bible because the canon dates to a time when India didn't have writing. But that also means the culture had strong reliance on memory for preserving teachings. Which they used for the Vedas - Brahmins were brought up to be able to memorize long texts accurately.
Same could have happened for the Buddhist sutras. There are monks to this day who are able to memorize the entire canon of thousands of pages accurately, recite it word for word from any point in the canon and with an understanding of what it says also.
So - it is at least possible that it was preserved as an oral tradition accurately for 500 years (with new Buddhist councils roughly every 100 years to check it).
The question is, was it preserved n this way or not? On this the scholars have varying views, with evidence both ways. But those who think that it is largely unchanged do have a lot in their favour. Especially - that the sutras believed to be earliest describe India as it was at the time of the Buddha, don't mention writing, don't mention the great King Asoka (even as a prediction of him) and describe the political situation also as many small kingdoms - which quickly changed not long after the Buddha died.
So - they do have a reasonable case there.
As for the later Mahayana sutras, everyone agrees they were written much later, from 500 to 1000 years after the Buddha. But - they also have this idea of enlightenment as a living inspiration that continues right to this day. Even today - the sutra collections are complete, no longer added to - but there are inspirational verses and practices that in some of the Mahayana traditions are thought to be present day direct inspiration of enlightenment. Not necessarily that the teachers were enlightened (though some might be) - but that at least that some of the teachings carry the inspiration of enlightenment.
So, those are such things as Zen koans, and inspirational texts for Tibetan Buddhists.
Then, with thousands of pages of sutra teachings, that helps to keep the traditions grounded. The continuing flow of new inspirational texts keep it alive and make it possible to keep adapting to new situations. That's how Mahayanists think about it. So - okay Buddha taught 2500 years ago. In those 2500 years then from time to time you get a need to express the teachings in new ways. But we think of all this as still essentially the teaching of the Buddha - the same inspiration.
Some of it may also be a continuing inspiration to this day in some way from teachings that Buddha gave at the time, passed to some of his disciples, but nobody ever wrote them down. And then perhaps they passed them to others and the inspiration in some way still affects us today of those unrecorded original teachings.
He taught for many decades. There is no way that the Pali Canon, extensive as it is, can be a complete list of all the teachings he ever gave to anyone in his long lifetime.
I haven't got as far as adding a section on the Mahayana sutras, but quite a bit on the Pali canon here with references you can follow to find out more about the various views. The article itself is unashamedly in favour of the "Theory of authenticity" of the Pali Canon which is my own view at prsent, pending of course any future discoveries / research.