Several ways, but it depends on how disciplined you are.
First, apply for a secured credit card. Secured credit cards are like debit cards in that your credit limit is tied to the amount you have in the account tied to the card. Use it regularly the establish a pattern. Eventually, you can get an unsecured credit card.
Second, you can get a co-signer on an unsecured card. That will get you the card. Make sure you pay it off every month. Use it regularly, but in moderation and pay it off.
Third, rent something. An apartment is best. You may need a co-signer, but get your name on the lease. Never, ever be late with rent.
You can also get your name on an auto lease or auto loan for a new or used car. Again, you likely need a co-signer. But, pay on time every time and build your credit.
You should also look into a credit-builder loan. They are usually offered by credit unions or community banks. Basically, you get approved for a loan, but you don't actually get the money until the loan is fully paid. So, for example, you get a loan for $1000 with monthly payments of $100. You don't get the money. Instead, it is like a forced savings account. You pay $100 per month. When the loan amount is fully paid, you get the $1000 cash. The payments are reported to credit services just like a regular loan. The purpose of these loans is to built a credit history. You can actually do this a couple times and build a good credit history.
If there are no dogs in Heaven, then when I die I want to go where they went. - Will Rogers Emery's Third Coast Triathlon | Tri Wisconsin Triathlon Team | Push Endurance | GLWR