Years ago, I purchased Minecraft Java Edition. Eventually I broke that laptop, and on my new computer the website wants me to buy the game again. I did have to re-download the game once on my old laptop, so I know I should be able to re-download it now. I also know for sure that it is the same account. How can I re-install Minecraft?
The minecraft.net website does not change, even when logged in with an account that already owns Minecraft. Make sure you're logged into the Minecraft website, then follow the links to purchase Minecraft until you reach the purchase store: From there, just click the appropriate download button and run the installer files that come with it. When prompted by the launcher program, simply login using your existing account.
Worlds are saved per device, not per account. This means the worlds on your old device will not be transferred to your new computer. Mojang does not provide a cloud backup, so you'll need to find your own. If your old hard drive is unrecoverable, you may not be able to get those worlds back!