You can buy Minecraft: Java Edition from the Minecraft Wesbite for $26,95. On PC the trial allows users to play on a single world for a 100 minute period before the map is locked or reset. The length of the trial depends on the device.
The Minecraft free trial is available on Windows 10, Android and consoles. There is no legal way to play Minecraft for free after the trial is over. If you want to continue playing after your trial has finished, you will need to pay. You can initially play Minecraft's free trial.