It kinda depends. IMO Java is better because it's like the OG version of the game. You can download custom mods, texture packs, skins and maps completely free. You can play any version you want, there's a much larger selection of servers, it's easier to make your own server and it's cheaper (at least in my case).
On the other hand we have bedrock. It's not really that bad but I think Microsoft made it worse. In the beginning Bedrock used to be just PE, and each platform had its own version built from scratch. Now all of them are combined. Basically Bedrock is much more multiplayer-friendly when it comes to playing with friend on LAN multiplayer. It's cross-platform, unlike Java. Also, if you buy Bedrock you can use it in multiple devices, meaning you and your friends can play with the same account (only paying once), although this only applies to PE (mobile) I think. I don't like Bedrock for the reasons I like Java (Bedrock doesn't have mods, you can't change version, etc.)
You used to be able to get Minecraft Bedrock (Windows) for free if you bought Java, but that ended in October 19th, 2018. If you did buy it before this date the claim deadline was on April 20th, 2020. If you don't have either, I recommend Java, you'll learn more, it's the real OG. Bedrock it's more like the secondary game.