There are a few ways to do it.
This is my preferred way to install SFML. It ensures that you build SFML with the same toolchain you use to build your projects and it’s straightforward to do on all platforms:
Clone SFML source code:
git clone https://github.com/sfml/sfml
cd sfml
Configure CMake:
mkdir build && cd build
cmake ..
Build
cmake --build . --target install
Download pre-built binaries for your platform here
SFML is available in a bunch of different package managers:
vcpkg (All platforms) apt (Linux) Brew (macOS)