There are two versions of Minecraft:
Java (Legacy), the first one, older one. Works better with some mods. It's only on PC and Mac. No cross platform, no online servers (servers are hosted differently, not on Microsoft's grid)
Bedrock, the newer one, latest features, Realms servers, issues with mods, cross platforms (you can play PC-PS-Xbox-Switch-Mobile all in the same world with your friends), marketplace which is pretty cool.
I prefer bedrock because I play with friends who only have a switch or xbox. Bedrock is on all platforms except macOS (it's on iPad and iPhone tho).