Both?
As above post says, there is automation called "Nav-to-Nav Transfer", which will auto-tune the ILS frequency when entering the terminal airspace area, and once APPR is armed and the aircraft is closing on the localizer, it will auto-set the front course and switch nav source to LOC1(2).
What you're doing wrong is manually switching to VOR to set the course. Coincidently I did a video recently that featured this. It's 4k, and not zoomed in, so you might need to enlarge it on your end to see the PFD, etc., clearly.