This is actually a fantastic question! Unfortunately I don’t have a definitive answer because I think it depends on how long you can forgo making money (purely focusing on creating content/developing a brand) and more importantly how you plan to monetize your own website. If you are just relying on ad revenue i would say there is not much of an advantage hosting your own site. But if you have your own products, and can effectively funnel leads, there should be a sense of urgency to create your own site.
I think if you haven’t developed either fully (medium or wp) then developing them concurrently is probably the best bet. Mainly because you can direct traffic from medium to your site with each new article.
You could do it the other way too, though. Honestly, whichever way encourages you to produce more content is probably the answer.
Rapid content production in the early stages can result in disproportionately high growth later on.
Either way — make sure you begin an email list. That is probably the most important thing on either platform. But especially medium as you don’t have access to readers info.