Hydrogen came from the big bang. The universe cooled enough to form hydrogen atoms after
370,000 years.
Oxygen forms when carbon forms. Carbon, nitrogen, and oxygen cycle through the
CNO cycle fusion process. The CNO cycle is the primary path for hydrogen to get burned into helium in large stars. Carbon forms in the
triple alpha process. Some oxygen forms from helium burning at the same time the triple alpha process creates carbon. Both become available when stars explode or blow out planetary nebula.
Water forms when interstellar gas clouds cool. In the vacuum of space water transitions directly between vapor and solid. That is not a good environment for life.
All Earth life is associated with water and it is
probable that all life everywhere is associated with water. If we find evidence for panspermia it is
likely that the sperm(seed)/cyst/spore need water in order to become active. There is no need for the source of water to be the same as the source of the spores. A
cyst can be embedded inside of a dry rocky chunk of asteroid. A foamy silica substance is more likely to enter an atmosphere with live samples. A icy snowball will melt/evaporate on reentry and tends to explode. Ideally you would want a heat shield like Apollo capsules or the space shuttle but it can be done with 99+% of the mass burning away. It does not need to be an efficient reentry vehicle. It could come in with millions of cysts. Only one needs to survive.