As a general rule, you should choose a heater that is 5 watts per gallon of water. Therefore, for a 3-gallon tank, you would need a 15-watt heater.
If you use a 50-watt heater in a 3-gallon tank, the water could become too hot and harm your fish. Fish are cold-blooded creatures, and they need a stable water temperature to survive. If the water is too hot, the fish will become stressed and more susceptible to disease. They may also lose their appetite and stop swimming. In severe cases, the fish may even die.
It is essential to monitor the water temperature in your fish tank regularly, especially if you are using a powerful heater. You can use a thermometer to measure the water temperature. If the water temperature is too high, you can unplug the heater or turn it down to a lower setting.
It is also a good idea to use a heater with a thermostat. A thermostat will automatically turn the heater off when the water reaches the desired temperature, thus helping to prevent the water from becoming too hot.