I have to have 3 things when I buy a car,
I first have to like the car and want to drive it long term (made this mistake before, paying on something you dislike sucks no matter how “good” the deal was)
Second it has to be something I can work on. This is certainly a more unique case for me, but being a technician I stick to cars I’m familiar with.
Lastly it needs to be a good deal, fair price, reliable car, and reasonable operating costs, ect.
My wife and I have done it both ways. For most I don’t think this makes a huge difference, especially with good credit. With good credit most dealerships are going to have some good options. With bad credit it could go either way, researching with banks or credit unions yourself is worth looking into if your credit is a little shaky.
Try to go cheaper then you think you can afford. Don’t buy something unless you actually like it, otherwise pay cash for some beater.