The formal equivalent of "coop up" is "confine". However, it sounds a bit strange and authoritarian in your sentence.
Interestingly, we almost always use this phrasal verb in passive voice: "She had to keep her pet cooped up all day."
The simplest and most natural sentence without the phrasal verb would be, "She had to keep her pet indoors all day."