Which is better to start with?
Ideally with a suggestion of what I could do.
Java then learn to go over to the API.
If you do plugins for your server then the other players who come to your server don't have to install anything, but if you do that with mods then they have to install these mods and almost no one does, so plugins are better for this case
Plugins are easier at the beginning
I would start with modding. You don't need a server and can test yourself how well things work all the time. If you are not yet able to code or can't code as well, you can e.g. B. Start with Mcreator from Pylo. So you can tinker mods with buttons, texture creator etc. Included and then always have the code displayed and switch back and forth between code and graphic mod development. If you get stuck at one point, you can just "program" again with buttons.
I've never coded plugins - I started with mods and checked directly how to do it. Found that very good for getting in.