Does this mean that the fund that I invested in tdameritrade is not an
index fund but an ETF?... I did purchase VFIAX with less than 3000 three or four years ago
You own VFIAX, which is the mutual fund. VOO is the ETF version of the same thing. Apparently TD Ameritrade does not require you to meet the $3,000 minimum initial investment.
A lot of Vanguard's offerings can be bought as either a mutual fund or Exchange Traded Fund (ETF). These work slightly differently from each other, but they track the same underlying assets. In this case, both track the S&P 500.
Ignoring fees, the returns of both of these would essentially be the same over time, so it doesn't matter which one you own. Now, the expense ratios are different (VFIAX is 0.04% vs VOO 0.03%), and TD Ameritrade might levy extra transaction fees to buy them.
If TD Ameritrade doesn't have any transaction or other fees, it doesn't really matter which one you own (other than the fund's expense ratio). The only difference is that VFIAX can be bought in any amount (after at least $3,000 invested), but VOO requires purchase in whole-number shares.
How is it different from the VFIAX fund directly available at
Vanguard?
You won't have transaction fees if you buy direct from a Vanguard account. TD Ameritrade may levy extra fees. You will also have to have at least $3,000 to buy VFIAX at Vanguard. But, you could buy the ETF version VOO for the minimum price of one share (currently about $300).
Would it be a good idea for me to buy directly from Vanguard with an
investment of 3000?
Only if TD Ameritrade has extra fees as opposed to Vanguard.
Would VFIAX fund that I have in tdameritrade interest not be
compounded( I see in tdameritrade that its past 10 year interest is
13.52%)?
The return of the fund (or ETF) is the same regardless of where you buy it from. The only difference would be the fees levied by the brokerage (such as extra transaction fees)
Do I have to sell and buy the stocks with interest every year for it
to be compounded?
No, that isn't necessary.
My goal is grow through this fund to a million dollars in 20 years. If
I keep investing 2000 per month in this fund, will I be able to reach
that goal?
Without knowing your current balance and assuming $2,000 a month investment in VFIAX (annualized return of 6.6%), your balance in 20 years would be just shy of 1m at $943,000.