Hi and welcome!
More information may be needed to help with this quite specific issue.
Your device set-up details can help as well as which version of SFML you are using etc..
Also, providing the actual error will help, including error codes and surrounding information.
Depending on if it's "not working" during runtime or compilation, call stack information may also be helpful.
One thing to be aware of, first, is that SFML's version has to match the compiler exactly. With VS, however, the latest one should be okay (it's 2022 version anyway!)
That is if you're using pre-build binaries. If you are building yourself, it's likely to match but it must be build correctly to work.
Similarly, the DLL have to match the Configuration. 32- or 64- bit DLLs must be used when building for 32- or 64- bit. Debug DLLs have "-d" on the end of the filename whereas Release DLLs do not. Debug and Release DLLs should match if building with Debug or Release.