My parents want to give my new baby some money for a savings account. However, if its just going to sit there for 20 years, I’d prefer for it to gain interest/dividends. Is there any easy way to setup a fund that tracks s&p500 and preferably tax advantaged? Or am I better off just investing in the relevant mutual fund.

If you’re wanting to save for future education costs, a 529 would be the best tax advantaged option. For more general purpose investing, a UGMA account would probably be what you want. Do keep in mind that kids assume ownership of UGMAs when they turn 18 though.
As for funds, just invest in any mutual fund or ETF that tracks the S&P500 if that’s what you want. VOO is a popular vanguard ETF.
This varies by state. In my state, my oldest gained access to their UTMA when they turned 18, but I am told I will still have my access until they turn 25, unless one of us explicitly revokes my access.
A UGMA/UTMA is basically a vehicle to gift money to a child, and then optionally invest it on their behalf, while having any gains on that money accrue to the child for tax purposes. Since most children don’t have much earned income, this will often result in them owing zero taxes on any unearned income on the account (unless there is more than $1350 of unearned income – read up on the “kiddie tax” if the income exceeds that).
OTOH a 529 is not a gift at all, until it is paid out. The money is technically still “owned” by the giver, they just have to name a beneficiary when they make an account. So any gains in a 529 don’t count towards the kid’s income at all, and if they are spent on educational expenses for the beneficiary they are not taxed on the other end either.
And once a year you can change the 529 beneficiary. So someone with a large 529 who finds that the beneficiary gets a scholarship (or doesn’t go to college) can change the beneficiary to someone else – even themselves.