1)The client side forge/fabric version should match the server side forge/fabric version
2)The mods installed on your Minecraft client (your PC) including the versions need to match the mods installed on your server (Exceptions like sodium and other client side mods)
3)If the forge/fabric version and the mods installed match then try deleting deleting the config folder which is located in the minecraft installation path (enter %appdata%/.minecraft in the file explorer )