Sure it’s okay to switch POV in a story.
There are all kinds of rules telling writers how to do it. ‘Keep the same POV for an entire chapter.’ ‘Keep the same POV for an entire scene.’ And so on. Lots of rules and they all try to keep the reader from being confused as to whose POV the story is in at the moment.
Maybe a better rule would be to make sure the reader knows whose POV is being used and just go with that, however the writer chooses to do it.
Just make sure that its clear to the reader!