

I think my betta fish is dying i dont know how to help!
i dont know whats wrong but he wont eat his tank is perfect on ammonia and like PH stuff hes in a 5 gallon but he sinks to the bottom and i let his food sit in water before i feed him we havent had him super long but i love him and dont know what to do he wont swim he barely moves im really scared i did something that may have caused this but i really want to try and help him get better please if anyone knows anything that may help him swim or eat tell me im desperat!
first is the day we got him second is now
Edit: He swam a little and is upright laying on a rock he seems to be breathing a little better now but im about to go to bed ill probably updste tommorow
Edit 2: he sadly passed away this morning i understand what i did wrong completely and i would love another fish but i dont belive i deserve one after what i did to this one. i dont really know what to do in this situation as i would love another fish but i dont want anything to happen to it ans he jsut randomly got very sick very quickly. Thank you so much for everyone who tried to help i really apprecate it!