Timmy uh, kinda surprised that you managed to get a virus from any Cosmoteer mod. Like, Cosmoteer mods aren't even executables! I suspect whatever mod you tried to get used ad.fly, which displays about a hundred adds all saying "Click me to download!", hiding the true download button pretty well. Anyway, if you want to feel extra safe, when you download the mod (which is in Mediafire), find it in file explorer, right click it, and then select "Scan with Windows Defender"
When downloading something, always make sure that you know exactly what it is before running it. Cosmoteer mods come in a .zip file, and contain things like a mod.txt, and a folder called "Strings". If your download ends up being an executable program, especially if it is named something generic, like "Setup.exe", then be very, very careful with it. I personally keep the habit of scanning pretty much anything I download (except for basic text and image files), no matter where I get it from, and I suggest you do the same