put the cart before the horse

To “put the cart before the horse” means to do or think about things in the wrong order.
Ex. They were trying to find investors without even having a business plan. They were putting the cart before the horse.