Think of it like this:
* The horse is necessary to pull the cart. You can't move the cart without the horse.
* Putting the cart before the horse means trying to accomplish something without first taking the necessary steps.
Here are some examples of how this idiom might be used:
* "You're trying to get a promotion without even finishing your current project. You're putting the cart before the horse!"
* "He wants to buy a house before he even saves up for a down payment. He's clearly putting the cart before the horse."
The idiom emphasizes the importance of following a logical order and taking the necessary steps in the right sequence to achieve a desired outcome.