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.

Nobody has mentioned this, but you can use up to 35k from a 529 to fund the beneficiaries roth IRA. Normal roth IRA rules still apply. Forbes has a great article covering this.
What this means is 10k deposited into a 529 at birth can become a million tax advantaged dollars come retirement age due to a lifetime of compounding interest.
More importantly for the broader audience, you can open a 529 before you even have the kid, and update the beneficiary later. So if you have the money to spare, and you’ve maxed out at tax advantaged accounts for yourself, this is something to consider.