The choice of viewpoints in a story is the author's but the author can also decide to change the viewpoint character or characters. Sometimes a number of characters are needed. Sometimes only one. There are times when during the writing of a story, another character needs to have a view. These scenes must be woven in soon and skillfully. I have a book that has one viewpoint and that's a murder series. I have another than has eight. The order is established in the beginning of the book This is important.
Now when you write scenes there are authors who throw in many viewpoints in a scene. This can be done skillfully but many times the reader begins to feel like they have whiplash and they don't care which character to root for. One rule is to maintain a scene in a single viewpoint. What if you want to switch viewpoints during a scene? Done with ease this can work. Some writers use some phrase to indicate the scene is changing viewpoints. The others make a decided break and start the next part of that sceen in the viepoint of a different character. No maatter what you choose, make sure the reader know through whose scenes the scene is talking place. And be very careful not to write something that looks to be in another character's viewpoint even for just one sentence,