Wiktionary
put the cart before the horse
vb. (context idiomatic English) To put things in the wrong order or with the wrong priorities; to put something inconsequential as more important than something more essential.