. I would find out water conditions nitrates, ammonia, nitrites asap. My guess is that the tank is still cycling. Sounds like it needs a water change, filter cleaning, and addition of live bacteria (store brought) and some salt should help out.
Then after another month or two you’re gonna need a bigger tank...as far as to how big? The bigger the tank the longer it will live. In perfect conditions even with perfect care it might live 1.5 years in that tank. With the information I’m getting from you it might live 6 months...if you’re lucky.
Edit: meant to say it might live 1.5 years in its current tank with perfect conditions (although unlikely and take a lot of skill to under feed the fish to keep it smaller while alive and healthy and keeping water conditions stable enough to maintain its health)