It's all about balancing debt-to-income ratio. It has to be decent. It shows you are financially responsible. But, you need some history of credit. It needs to show you make payments on time. also,a good rule of thumb is to keep a small balance on any credit card you have, but no more than 20% of the credit limit. Again, shows financial responsibility.
It takes years to build good credit and longer to fix bad credit.
Good luck!