So you were feeding it with ammonia during that time, not just set it up and let it run right? And you say the ammonia spike, the nitrite spike, then ammonia fell and stuck at zero even after a full week of water changes, then nitrites and then you were left with only nitrates, so you did a huge 90%+ water change to bring those down before adding?
Food was not an appropriate suggestion sorry. You should look for a betta specific pellet whose first two or three ingredients are whole
fish, not fish meal or wheat.