Firstly, you need a credit card, and you need to use it. Without it, it's nearly impossible to build a credit score, and without a credit score, you are going to pay significantly more for loans, if you can get them at all. If you ever want to own a house, you will need a loan, and even a small increase in the interest rate for your mortgage is a ton of money over 30 years. You will probably need a loan for a car too. Credit scores are also starting to impact things like employment as well.
There are a couple aspects to credit scores: payments on time, total amount of available credit, how many hard inquiries, length of credit history. To sum that up, get a bunch of credit cards, keep them open, use each one at least once per year and at least one more often than that. If any charge an annual fee though, close them as soon as you have a couple of cards that don't. The hit to your credit score is worth not wasting that money every year.
Secondly, always pay your credit cards off every month. As long as you do that, you pay no interest, and you will still build credit. No matter how you pay, don't spend money you don't have. While it's better to float a balance on a credit card than get hit with a bunch of overdraft fees on your bank account, neither should happen if you don't overspend. Try to save 6 months of expenses too so that even if something unexpected happens you can afford it without paying the very high interest rate credit cards charge.
Thirdly, and least importantly are rewards. Good credit cards will give you 1-2% cash back on everything and up to 5% back in various categories. Some also give up to $200 as a sign up bonus when you spend a certain amount in the first few months. Try to open a new card every 6-12 months both to boost your credit score and get that bonus. If you open too many too quickly, you will hurt your credit score from the inquiries and will have trouble hitting the minimum usage for the signup bonus. Try to pay your bills every 6 months instead of monthly for services that offer that like car insurance so that you can hit the signup minimums without buying anything extra. The services generally give you a discount for doing that too. Eventually you will have enough category variety to always get 5%. But remember, 5% is less than the 20% APR on your balances, so don't buy things you don't need or can't afford. Some cards give airplane miles or hotel stays or whatever. Only get those if you think you will use those things. You can always use cash.
Overall, it's a game you play with the banks. Play it well, and you can make a decent amount of extra money in rewards and lower loan rates. Play it poorly and the banks make a ton of money off you in interest and fees. Remember, just because a credit card gives you a $5000 limit, the real limit is your bank account balance.