The Default Method: 4d6 Drop Lowest
If you are reading the Player’s Handbook for Dungeons & Dragons 5th Edition, the standard and most widely accepted way to generate character ability scores is the "4d6 drop lowest" method.
The process is simple: grab four 6-sided dice (4d6) and roll them all at once. Look at the numbers, find the die showing the lowest value, and remove it from the pool. Then, add the remaining three numbers together. This final sum is one of your ability scores. You need to repeat this exact process six times to generate a complete array of six numbers—one for Strength, Dexterity, Constitution, Intelligence, Wisdom, and Charisma.
Once you have your six numbers, you are completely free to assign them to your stats in whichever order best fits the class you are building. Want to be a wizard? Put your highest roll into Intelligence. Rolling a barbarian? Prioritize Strength.