Even when set up "correctly" there are going to be a few shows where things are wrong, just due to different groups classifying series differently in some cases.
for the basics, you just need to ensure you have the right folder structure and the standard episode numbering in the filename, usually "/libraryroot/Show Title/Season 01/Show title - Episode Name - S01E01.file"
there are cases where a show has multiple seasons but some are classified as a separate show, some are separate single cour seasons, some are multiple cour seasons, specials etc. and that changes based on where you get your metadata and often differs from what the release groups will use.
So to tidy it up in those situations I use TinyMediaManager to manually build the metadata and write that to a file that jellyfin will use above all other providers.
I've only needed to do that in full detail for Monogatari series though, since I have my preferred way to arrange that abominable mess. pretty much everything else I stick with whatever the AniDB plugin wants and adjust my files to suit.

