How long was the filter off? Leaving the filter off a little while should not be causing any fish to die. I leave mine off when cleaning or doing water changes, which in my larger tanks can be an hours long affair. Be careful when completely cleaning a tank and changing 100% of the substrate, because you are also removing any beneficial bacteria that has been built up within. You should get yourself a water parameters tester, such as the API Freshwater Master Test Kit, which is relatively cheap on Amazon. Use the kit to test the Ph , ammonia, nitrate and nitrites. It sounds like a lot of complicated work but it is very simple even for beginners. You just use the included test tubes to fill with a little tank water, then put a few drops of the included test chemicals into each tube according to the directions on the bottle, then wait a few minutes for the color to change - then you just compare the colors of the tubes to the included color chart. Once the parameters are known, you can then address any issues that have come up, such as a high ammonia level. This can be done a number of ways, but personally what I have used for years is a product called Seachem Prime, which again is available on Amazon, as well as most chain pet stores.
One mistake that new fish keepers make is not properly cycling their tank before adding fish, or not using a quick-start solution like Fluval Cycle. This is done to not only remove any ammonia or nitrites, but to help balance the biological bacteria concentration of the water. You also want to make sure you treat your tap water to remove any chlorine or heavy metals that may be present. The amount of each will differ depending on your water source. This can be done using a number of products, but using Seachem Prime will also address this. This will be ground zero for starting a healthy tank. Once this is done, if fish continue to fall ill, then we can examine further possibilities, such as bacterial or fungal infections.