Question: Is it okay to have the vast majority of a book in one character's POV and then change to another for a chapter or two?Answer:
You can find many examples of books where this happens. It is done in stories when there are important events the main character cannot be witness to.
Prologues, for example, featuring events that take place before the main character's birth or before the main character enters the story, are often written from a different POV.
The same is true for epilogues.
However, it is important to have a good reason for switching POV in the middle of a story, especially if the second POV is not going to have a fully developed storyline. Once readers have grown attached to a main character, they generally prefer to stick with that character. If you can make the reader appreciate the same plot points without changing POV characters, that may be better.
If you're going to write from multiple points of view (as, for example, many romances are), it's usually better to develop each POV character's story.