Why Buddha rejected Upanishad and Veda? For what reason did Buddha rejected Upanishad and Vedas?
Because nibbāna of Upanishad and Vedas is sassata-diṭṭhi (eternalism) in brahmmajālasutta. But nibbāna of buddhism is enlightened by ariya at the finish line (enlightenment) of the middle way, that is in the midst of whole extreme teaching around the universe, such as eternalism,  annihilationism, egoism, altruism,  theistic determinism, determinism that only past-life's karmma is cause of present life (i can't find the correct word of this view), accidentalism, nihilism, Marxism, democrazy, communism, science, capitalism, etc.
What is the middle way?
The middle way is ariya-magga (The Noble Eightfold Path), the best balanced teaching which must leads to the complete and perfect whole suffering cessation (anupādisesa-nibbānadhātu). The middle way must have these whole properties as their results, not just some properties:

Dhammacakkappavattanasutta:
By avoiding these two extremes, O bhikkhus, the Tathāgata has gained
the knowledge of the middle path which leads to insight, which leads
to wisdom, which conduces to calm, to knowledge, to the Sambodhi, to
Nirvāna.
....
‘This, O bhikkhus, is the Noble Truth of the Cessation of Suffering: (it ceases with) the complete cessation of this thirst -- a
cessation which consists in the absence of every passion -- with the
abandoning of this thirst, with the doing-away with it, with the
deliverance from it, with the destruction of desire.
...
‘And this knowledge and insight arose in my mind: &quot;The emancipation of my mind cannot be lost; this is my last birth; hence I shall not be born again!&quot;’
ādittasutta (ādittapariyāyasutta):
“Monks, the learned, noble disciple seeing it thus turns from the eye and forms, eye-consciousness, eye-contact and whatever feelings,
pleasant unpleasant or neither unpleasant nor pleasant born of
eye-contact, he turns from that too  re  He turns from the mind,
deas, mind-consciousness, mind-contact and whatever feelings, pleasant
unpleasant or neither unpleasant nor pleasant born of mind-contact, he
turns from that too. Turning loses interest. Losing interest is
released. Released knowledge arises to him, I am released, birth is
destroyed, the holy life is lived to the end, duties are done, I have
nothing more to wish.”
The Blessed One said thus and those monks delighted in the words of the Blessed One.
When this exposition was done about a thousand monks released their minds from desires without anything remaining.
mahāsatipaṭṭhānasutta:
&quot;These are the single gold paths to the purification of beings, to the overcoming of sorrow &amp; lamentation, to the disappearance of pain &amp; distress, to the attainment of the right method, &amp; to the realization of Unbinding — Summary are the foundations of mindfulness.

Tipitaka studing that heritage from Arahanta, tipitaka reciting, and tipitaka memorizing his tipitaka knowledge, these 3 things make the buddhist practitioner understands tipitaka.