IIRC, what is generally common for Yamaha is the yellow wire connected to the highlight is for high beams. It is that way for the 660 along with 700 Grizzly. I believe it is the same for the 450 as well.
As for your 3 wire switch, generally, that is going to be voltage in on 1 of the wires, when the switch is tuned On, voltage will flow to the other wire. Those two wires should be your white and red. Black is usually only there if that is a lighted switch as it needs ground. Is that a lighted switch? If so, you can easily test the switch with a 9-volt battery. Put the switch in the Off position, battery + to the white wire and battery - to the black wire. Does the switch LED light up? If no, then that is the side you want voltage to show up on when you ATV is powered up via the headlights. If you now move the switch position to On, the LED should light up. If running the initial test with + to the white wire and the switch LED does light up, then move the battery + to the red wire and see if the switch LED lights up with the switch in position Off.
Relays are actually not very difficult to think through but you need to understand a few things first. I don't mean for this to sound condescending, just trying to explain it if you are having difficulties, which sounds like you are.
Does your relay have an item number on it? If it does, what is the number?
A relay is a type of switch but the internal switch is activated based upon one of the pins being energized.
If it were me trying to power your light bar and I only wanted the light bar to come on when the brights were on using a 5-pin 30A automotive Relay:
ATV headlight bright's yellow wire to your switch's white wire (assuming this is the correct wire based upon your test above). The switch red wire would go to pin 86 on the Relay. Switch black wire to ground.
From the Battery +, connect a 30A inline fuse and then connect that to Relay Pin 87. Relay Pin 85 goes to ground. Relay Pin 30 would be used for Load, i.e. your light bar + or red wire. The light bar black goes to ground. Relay Pin 87a is unused.
Use the below link as a reference for a 30A Automotive Relay.
https://www.the12volt.com/relays/relaydiagram25.html