Use a version the server accepts. The newest release is not always the right choice.
Follow these steps
Read the supported version range
Check the server page and its official announcements. A directory version can lag behind a recent update; ask the owner if the game’s error contradicts the listing.
Choose the right Java installation
In the official Launcher, open Installations and select or create an installation with the required version. Launch that installation before reconnecting.
Check Bedrock updates and preview builds
Use the normal release unless the owner explicitly supports Preview or Beta. Update through your device’s official store if the server requires a newer release.
Check modpack compatibility
If the project requires mods, match its game version, loader and modpack release. If the server has not updated yet, wait for its announcement or choose another compatible server.
Common questions
Will reinstalling Minecraft fix this?
A reinstall does not change the version the server accepts. Check compatibility first.
Can Java and Bedrock version numbers be compared directly?
No. They are separate editions with separate releases. Check the accepted version for the edition you actually use.
Further reading
Official documentation and project references for this guide.