Is a loan debt the same as credit card debt?

I got a loan back in 2019 and unfortunately I wasn't able to pay off on time and the company sold it to a debt collector that debt collector ended up suing me. After 5 years I finally was able to pay it off and I contacted him and payed it off. I'm really trying to get my credit up , I never had a credit card but I have heard that bad record stays for 7 years. should I apply for a credit card? how can I get a good credit after I payed off my debt

Is a loan debt the same as credit card debt?
Post Opinion