Thanks, all. I was able to get the following to work well:
=SCAN(0, query(GOOGLEFINANCE("SPX","price",TODAY()-365,TODAY()), "Select Col2 offset 1",0), LAMBDA(currmax,value,MAX(currmax,value)))
Credit to https://support.google.com/profile/24340643...