let me explain in detail

let m1 and m2 be mass of two bodies let u1 be velocity of m1 before collision and v1 after collision.... U2 velocity of m2 before and v2 after collision

kinetic energy= 1/2 m v^2 so when a body collides obviously its velocity changes so K.E cannot be constant

momentum= mv so obviously this for 1 body will not be constant but.....

the total momentum is conserved which means

m1v1 + m2v2 = m1u1 + m2u2

total final momentum = total initial momentum

which means total momentum before collision of two bodies equal total momentum of two bodies after collision......

REMEMBER FRICTION IS NEGLETED IN THE ABOVE CASE

when two bodies collide certain energy is lost to produce sound energy and heat energy so temperature is not constant in reality( Here we not neglecting friction and other forces if you neglect then tempr becomes constant)

hope you got your answer if not there is always blurtit