Visual effects (VFX) and computer graphics (CGI) are the two main aspects of creating special effects in video.
Visual effects (VFX) is the process of adding, altering, or enhancing a video with special effects created with the use of various techniques and tools. This can include adding fantastic creatures, explosions, character animations and much more with the help of computer graphics.
Computer graphics (CGI), on the other hand, is a narrower term that describes a specific method of creating images with the use of computer graphics. CGI includes the creation of three-dimensional models, animation and visualisation, which can be used in video. However, not all CGI effects can be considered VFX, as not all of them are designed to be added to the actual script.
Thus, the main difference between VFX and CGI is that VFX is a broader term describing visual special effects in general, while CGI is one of the tools used to create these effects