Answers in Genesis, an Apologetics site dedicated to defending the Bible as inerrant, gives five "reasonable" possibilities: Bear in mind that the real answer is, "we don't know for sure", and we can't answer what did happen. The best we can do is offer plausible explanations of what might have happened. Typically this is done using common rules behind resolving alleged Biblical discrepancies. So, from an Apologetic standpoint, their answers do offer plausible resolutions to the apparent conflict.
First, Exodus 9:3 states, “"Behold, the hand of the Lord will be on
your cattle in the field, on the horses, on the donkeys, on the
camels, on the oxen, and on the sheep—a very severe pestilence."”
Surprisingly, this verse does not mention one of the most important
domestic animals at that time—the goat.1 Therefore, it is possible
that all of the livestock except goats were killed in the first plague
on the livestock (fifth plague overall), and in the second instance it
was goats that were affected by the plague of hail.
Second, Exodus 9:19–20 mentions that those who “"feared the word of
the Lord among the servants of Pharaoh"” were told to get their
livestock out of the fields. Some scholars mention that these
Egyptians may have been warned about the previous plague of pestilence
(although it was not recorded), so they still had all of their
livestock left. In this scenario, God warned them to put all of their
livestock in barns so they wouldn’t be killed by hail.
The third possibility is similar to the previous explanation except
that the survival of their livestock hinges on the phrase “servants of
Pharaoh.” Perhaps this means they were not actually Egyptians, but
other vassal subjects who were warned of the plagues so that their
animals could be spared. So in Exodus 9:6, where it says that all the
livestock of Egypt died, this view suggests that the animals belonging
to these foreign vassals were spared if they obeyed God and not
Pharaoh.
Fourth, the Bible does not reveal how much time passed between the
fifth plague and the seventh plague. Following the fifth plague, which
wiped out the livestock of Egypt, the Egyptians may have taken some of
the livestock belonging to Israel. Another possibility is that they
bought (or took) livestock from surrounding areas (Libya, Ethiopia,
Canaan, etc). The first option would require very little time to
complete while the second would probably require at least a few weeks.
But since the Bible does not specify how much time passed, either is
possible.
The fifth, and perhaps simplest solution, would be to acknowledge the
fact that “all” does not always mean exclusively “all.”2 We must use
the context to determine its meaning. In the case of Exodus 9:6, it
might be best translated that “"all manner of livestock of the
Egyptians died."” In other words, the plague included all kinds of
animals, as clarified in the third verse: “"on the horses, on the
donkeys, on the camels, on the oxen, and on the sheep—a very severe
pestilence."” This is the approach taken in Coverdale’s translation,
and the New English Translation includes a footnote with a similar
explanation.