I have recently received some money that I could use to repay my personal loan, however I am not sure if doing that, is a better idea than continuing paying the loan normally, with instalments taken from that money which I would keep in my account.
The question title:
Is it a good idea to make a lump-sum payment to pay off a personal loan, even if I want to build credit history?
Assuming that there isn't another debt with a higher interest rate...
Assuming that you have money set aside for emergencies...
Then making a payment to either completely payoff the debt or to reduce it significantly makes sense.
You don't want to pay money to try and improve your credit score. Keeping a loan that has a higher interest rate than the guaranteed rate of the account you would keep the cash in, will cost you money.
Even if the rates are close to each other, paying off the debt will help your credit score by reducing the amount of debt you have.
Paying the debt in full doesn't make the history of the debt go away. For several years after the loan is retired your credit history will still show that you paid the debt on time. Which is a good thing.