A mod works for you in singleplayer, but the server won't start with it – or your friends get kicked with a "mod mismatch" message when joining. Usually it's one of these causes.
1. The mod is client-only
Some mods only change what you see: shaders (Iris, OptiFine), minimaps, zoom, inventory sorting, FPS mods like Sodium. They don't belong on the server and often crash it. Remove them from the mods folder under Files.
2. Loader or version don't match
Fabric mods only run on a Fabric server, Forge mods only on Forge, NeoForge mods only on NeoForge. The Minecraft version must match exactly. Check your server software under Installer → Server version. Many Fabric mods also need the Fabric API.
3. Players have different mods
Every mod on the server that adds content (blocks, mobs, items) must be installed by your players in the same version. A modpack installed via the CurseForge or Modrinth app is the easiest way.
Where's the error?
The Console tab shows which mod causes the error at startup. Look for "requires", "Incompatible mods found" or "crashed". Still stuck? Open a ticket with the mod's name.