FIFO is applied automatically when no specific lot is identified. In a position accumulated over years it sells the cheapest shares first, producing the biggest gain, though usually taxed at the long-term-capital-gain rate because those shares are the oldest.
For an active trader turning over positions within days, FIFO and specific identification often produce the same answer because every lot is short term anyway. The difference matters for long-held core positions and for tax-loss harvesting.
Some brokers let you set a standing default of FIFO, last in first out, highest cost or lowest cost. Changing the default affects future sales, not ones already reported.
This is general information for the United States, not tax advice; rules change and depend on your circumstances, so confirm with a professional.
Related: cost-basis-methods, specific-identification-cost-basis, long-term-capital-gain, average-cost-basis, form-1099-b