The money that goes to purchase your car, is invested money that earns a non-zero return, whoever it comes from. If you have the cash, you be that investor, and you earn the return.
The manufacturer, and the dealer, have a bunch of dials they can twist to get the most money out of you while convincing you that you are getting a good deal. It’s win-win, except you don’t actually win. Paying cash takes the dials away.
They do this dozens of times a day, every day, and they don’t play to lose money. You’re not going to beat them.
Before going to the dealer, I recommend check with your local credit unions, and getting approved for a loan. They usually have pretty low rates. If the dealer can beat that rate, go with the dealers financing, otherwise use your credit union financing.