The Astros managed to build a World Series winner thanks to a few top 2 draft picks and trades and free agents (and cheating of course), but their somewhat successful draft history shows just how wonky MLB drafting can be...
2012 they got Carlos Correa at #1. Great.
2013 they drafted Mark Appel, who never pitched in the big leagues... until this year, where he pitched 10.1 innings for Philly before getting released. He was originally drafted out of high school in 2009, but didn't sign and attended Stanford. In 2012, after his junior year, he was projected to go #1 but fell due to signability and was taken at #8 and did not sign. Then the Astros took him first the next year. He was traded to Philly a few years later until he was designated for assignment and stepped away from baseball in 2018 at 26 years of age. He tried a comeback in 2021 and finally reached the majors before eventually being released. But hey, he has a career 1.74 ERA in his 10.1 IP... So at least he's got that. And a degree from Stanford, which is nice.
In 2014 the Astros drafted Brady Aiken, who they were about to sign for $6.5m until medicals revealed some shoulder inflammation. They reduced their offer to $5m and he did not sign, which had some other ramifications for the rest of the Astros draft (they lost bonus money they could have used to sign other draft picks over slot because they failed to sign Aiken under the $8m slot value), but that later ended up being a blessing in disguise. Aiken ended up requiring Tommy Johns surgery on the ligament that Houston found was inflamed. The next year Aiken was drafted at #17 by Cleveland and signed, but six years later was released and is currently one of three players drafted at #1 overall who has never played in the MLB.
In 2015, the Astros got the #2 overall draft pick because they failed to sign Aiken and selected Alex Bregman, who was obviously a core player leading to their World Series titles.
Anyway this is a pretty nice history to show how silly the MLB draft can be. The two guys the Astros picked at #1 who were so highly regarded teams weren't sure they could sign them / weren't signed by them never even played in the major leagues.
The only absolute in building a baseball winner is that money makes it easier, but even the teams with seemingly infinite money need to successfully spend it in multiple ways be it free agency, the draft, international scouting, and player development to really succeed.