First of all, What’s the difference between Vector and Raster?
Vector images are compiled of pixels to display an image, which is made up of paths, those paths are equipped with formulas that tell them how to fill the picture and what color it is. The images keep their appearance in tact regardless of the size it becomes. Vector images can be created and/or edited in illustrator, CorelDraw, and Inkscape. Moving on to Raster, it is made up of individual pieces of colored pixels. Each pixel is stacked together to create the image, it creates rich pictures. JPG, GIF, and PNG are all Raster files, the pictures digital cameras take are also Raster images. A key difference between Vector and Raster is that Raster images cannot be scaled up, they can be scaled down though. When they are scaled up, the picture becomes blurry.

When to use Vector images
Vector images are becoming way more abundant in digital marketing rather than Raster because of their quality when scaled up. They are used for logos, 2D or 3D computer animations, digital printing which includes billboards or business cards, and many other things! A software used by Vector is also Adobe Illustrator, which is well known by many people.
When to use Raster images
Raster images are still everywhere, most of the images you see are Raster. Their usage is mostly used in photography and sometimes print material, some use them while doing art, this can include things like painting.