How do I swap between Character & Vehicle?

Not much related to your objective, but here’s a very basic course since you’re seemed interested.

About where to put which blueprint code, you should handle the character switching mechanic inside the level blueprint, which you can open like this:

And after you create a new input mapping context (which you can do by right clicking on an empty space on the content browser, hovering on the Input section on the menu that pops up, and clicking on the Input Mapping Context under the sub-menu), you can assign the two characters’s input mapping contexts respectively as shown above, in their character blueprints.