Hi there,
There is a few ways you can go about it, now I don't use Visual Code much beyond file editing and small websites, but you should be able to use it alongside some tools.
CMAKE CMake is the way I would do it, but can be a little complex if you are new to all this. You can download SFML to some location and setup a CMakeList.txt to specify your project, files and dependencies, etc. You might need to download or create an FindSFML.cmake or sfml-config if one doesn't already exist (it probably does). In fact, there is a tutorial on how to do it here:
https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php right from the SFML page. There are plenty of tutorials to get Cmake to work with MinGW, in fact, one of the generated projects can be MinGW32-makefile.
Also a note, make sure that MinGW and CMake are in your PATH environmental variable, otherwise you'll run into not found command errors.
ManuallyYou can use the MinGW on the command line to build your code. I think the command is mingw32-g++. Bare in mind you'll have to specify all your source files and the command can become unwieldy when it grows, which is why CMake or an IDE is better for building if you don't want to manage this. Alternatively, you can add the command to a .BAT file and append source files to it as your project grows.
This might help:
http://www.mingw.org/wiki/MinGW_for_First_Time_Users_HOWTO
and this snippet here:
https://stackoverflow.com/questions/19980043/how-do-i-use-the-mingw-compiler-from-the-command-line-on-windows
and here as well:
https://courses.cs.washington.edu/courses/cse326/00wi/unix/g++.htmlThe above link shows -I and -l which can be used on the command line to link to the SFML libraries and inludes.
Use an IDE IDEs can make your life easier and if you are new to software (or new to C++) this can just make it easier for you to get started. I can appreciate Visual Studio/CodeBlocks can feel bloated, but they do a lot of the leg work and the debugger in Visual Studio is top notch.
Hope this at least points you in the right direction.