Finance or buy new car outright? Lowest auto loan found is 5.24%

Hi everyone. I’m purchasing a new car in the LA area that has an OTD price of approximately $55,000. With financing rates as “low” as 5.25% (local credit union) and as high as 7%(dealership), I’m at a crossroads as it seems buying outright does not seem encouraged nowadays. Rates aren’t low as in the past where it seems investing could give a higher return than loan interest rates. My gross income is around 160-170k/yr. Is there any investment opportunities out there where it’d be worth to finance instead? Should I purchase outright?