The more different types of credit you have, the better your “credit mix” is. In theory, lenders like to see that you have multiple types of credit and that you’re able to balance them responsibly. It all connects back to the idea that your credit score is a representation of how responsible you are with money and whether someone should trust you to pay them back.
When it comes to building your score, credit mix can have an effect - but it only accounts for about 10% of your score, and is typically considered low impact. You shouldn’t take out other types of loans just to improve your credit mix. Having a good mix of credit can be a good thing, but it’s not going to be a real difference maker when it comes to building your score. Instead, focus on high impact factors, like making on-time payments and keeping your utilization low.