Imagine there is a ball traveling to the right which have less energy. The individual molecules in that ball all have some energy and momentum associated with them.
The momentum of this ball is the sum of the momentum vectors of each molecule in the ball. The net sum is a momentum pointing to the right.
Now after a inelastic collision each molecule of same ball has a different momentum and energy but the sum of all of all of their momentum is still the same value to the right as it is vector quantity. So if moment of one molecule increases same for other molecules decreases. So result is momentum is conserved.
Even if the individual moment of every molecule in the ball is increased in the collision, the net sum of all of their momentum vectors doesn't have to increase.
But energy isn't a vector, increasing the kinetic energy of molecules increases the total energy of the system. So as energy is lost in inelastic collision thus kinetic energy of overall ball decreases.
Regards