So I'm a returning player to minecraft, the last version I played was 1.8. Upon downloading minecraft and booting it up, I noticed an "installations" tab in the new launcher. This got me wondering if it is possible to mod just one of these installations, and how you would go about it if it was possible. This would be great because I would like to play modded minecraft, but none of my friends do. If I could easily switch back and forth between installations, one modded and one vanilla, I could get the best of both worlds.
If you have multiple modded version profiles that are 1.12.2 and below you can use say a '1.12.2' folder in the mods folder .Minecraft/mods/1.12.2 for example and it will play the mods, if you have Forge, Rift or Fabric (new modloaders that exist now) that feature to read mods in deeper folders doesn't work anymore for 1.13+ modloaders.
But yeah if you want to play modded 1.7.10, 1.10.2, 1.8, 1.8.9, 1.12.2 or 1.13+ versions, even snapshots you can just create a new profile, set up a modloader you want (most likely Forge or Liteloader for versions between 1.7.10 and 1.12.2) and your good to go.
There is also datapacks that are like early Official Modding API Vanilla mods of sorts too that you can put in your saves/datapacks folder or if using Fabric can use a mod that loads the datapacks in a global folder. They aren't the same as mods where it adds new items, biomes and so on as 100% brand new content but rather a half step of modding where developers re-using Vanilla ones with different functions or textures or particles or locations in the nether to achieve a mod-like experience (that and mods do use datapacks to achieve things due to 1.13+ changes that datapacks were added.