Cost basis is how capital gains are calculated--it's the official price you bought the stock at. You only pay taxes on the sale price (or reduce ordinary income by the losses) above and beyond the cost basis--the capital gains. I buy a share for $100, I sell it for $120, I am only paying taxes on 120 - 100 = $20 of capital gains.
Average cost = when you sell a share, you take the total $ invested in ALL shares and divide by # of ALL shares. That works out to the average stock price at the time you purchased. It's an option only available to mutual funds. Once you use this method (sell a share under it), I believe it is permanent for all shares purchased prior to the sale date.
Actual cost = when you sell a share, you take the real cost of that actual share you bought based on its price at the time you purchased.
For actual cost, you then also need to think about your disposal method. FIFO is first in first out, meaning you sell the earliest shares first. I know from your posts you're heavy in US market funds, which will generally go up over time. So FIFO will generally incur the largest tax liability when you sell (markets generally go up, so the first stocks you buy will generally have the lowest cost basis), which most people want to avoid.
If you are in Fidelity, they have a setting called
Tax-Sensitive Short-Term: any time you sell, Fidelity will prioritize selling the largest net tax-impacting loss based on set short-term and long term tax rates (meaning you deduct those net losses up to usually ~$3k/year from your income), followed by the smallest to largest tax impact for net gains. For most people with all their eggs in one or a few baskets and not trying to set themselves up for complicated tax loss harvesting (selling paired loss + gain stocks to net out 0 capital gains for a year), this is probably the best way to sell, and probably what I'd recommend in general.
Rangoth is right that this isn't a 'now' problem, but I'd also argue that it's most important to understand for a long-term investor, because you'll be adding to your position over many years and then exiting in portions near the end of it all. There will be
material tax differences between selling the early tax lots vs the later ones. If I sell 2005 SPY today I'm paying $550 - $150 = $400 * 15% = $50 per share in taxes, vs selling 2023 SPY and paying $550 - $450 = $100 * 15% = $15 per share. That's a difference of $35 per share that's no longer earning for me.
Conversely, if you're just opening and closing entire positions like a number of posters in this thread, every single tax method is the same and none of it really matters.