Pets are amazing, but I think you need to be doing well enough yourself before taking on that responsibility.
I got a puppy thinking it would cure my loneliness, my depression and my drinking. Fast forward 3 years later and he lives with my parents.
Which is totally fine because he adores them, they love him and I just think he is better off with them until I get back on my feet again. I recently moved back home, so I get to play with him and walk him daily. Which is great.
Truth is I was nowhere near ready for the responsibility. Things were pretty good for the 1st year, but then things got so bad I couldn't even take care of myself let alone a rambunctious puppy. Thankfully I had my mom and dad who intervened.
Just be honest with yourself before making that big decision.