This is called a fish-in cycle. You need to measure both ammonia and nitrite every day, and whenever you have a reading for either of them above zero, do a water change.
A fish tank needs 2 colonies of bacteria to remove the ammonia excreted by the fish, and the nitrite made by the first bacteria. It takes a while to grow enough of them, and until there are enough, the fish keeper has to keep the fish safe by doing water changes.
There are things you can to to help.
Feed the fish every other day. Less food = less ammonia.
Add a good bacterial starter to speed things up
Add live plants to the tank as plants take up ammonia faster than bacteria and they don't turn it into nitrite.