What does putting the cart before the horse mean?

It means doing something in the wrong order, or with the wrong priority.
"Don't put the cart before the horse" (proverb) says be sure to do things in the proper order, ie. the first thing first, the second thing second, etc. It can also mean to slow down and take things as they come, not to try to rush to finish something.

It means that you should not plan a step of an operation before the preceding steps are completed. In other words, keep your procedures in order and don't jump ahead.
Example : "The council hired a ticket sales company before they had considered what type of sport would be played. This was putting the cart before the horse."

It is sometimes thought to be a motor racing expression coined in the 1950's and 60's, at a time when a lot of racing teams were experimenting with putting engines in the middle or rear of the car (the cart referring to the car where the driver would sit, and the horse referring to the engine).
But its use pre-dates this, to at least the 16th century, the era of horse and carriage. A carriage is designed to be pulled by a horse, not pushed, so putting the cart first would preclude its proper functioning.

It may be drawn from a proverb but should be termed an idiom. It comes from Cicero, originally, a Greek orator and philosopher. It has come to mean someone getting ahead of himself or getting things out of order, such as putting on your shoes before your socks.