I have finished the main Pokémon series but the before mentioned games seem really different. How do they match the main game and do I need to get the first in the series to progress?
They're nothing like the main Pokemon games. In the Mystery Dungeon games, you are exploring dungeons and levelling pokemon and going on quests. Pokemon Ranger is more about collecting Pokemon (but not using them in teams or for fighting or anything) and solving puzzles and completing tasks.
Neither of those series really follow each other in any way - every Mystery Dungeon or Pokemon Ranger game can be played as a standalone title, and you won't be missing out on any story or anything. Each game will explain any controls/story/etc elements that you might need to know.