A personal loan will increase your credit score if you do not default on any of the payments or miss any payments.
But if you miss payments or default on the personal loan then it will ruin your credit. Only take out a personal loan or other loan if you know you'll be able to pay it back on time and not default on the loan.