I have added a background image using a tutorial on YouTube. it shows up just fine in my camera view but does not show up when I render the animation or render my viewport. The entire viewport shows up as white
A Background Image is an Empty which displays in the viewport. Because an empty has no volume and surface, it cannot be rendered.
If you need to render an image in the scene use the Images as Planes addon.