Neon tetras are schooling fish, meaning they prefer to live in groups of at least 5-6 tetras. If they're left alone in a tank, they can become stressed and become unwell.
They also like to swim around the entire tank, so a 20-gallon tank is a good size for them to get the space they need. You should also include plants, driftwood, and caves to make the tank more attractive to them.
When you're stocking a tank with neon tetras, it's important to choose a variety of plant species that are compatible with the tetras' requirements. Some good choices are java fern, Amazon sword, and anubias.
Once you've decided on the plants and other features for your neon tetra tank, you need to ensure that the water is cycled properly. Cycling the tank allows bacteria to convert ammonia into less harmful compounds. This process is known as bio-filtration. Once the tank is cycled, you can start introducing fish. You should start with only a few fish at first, so that the new tankmates have a chance to adjust to the water before adding more.