I managed to figure it out. Thanks everyone!
This worked:
g++ -std=c++20 -DSFML_STATIC -O2 -no-pie -fno-pie -I/home/uzzer/LIB/SFML-2.5.1/include -o main main.cpp -L/home/uzzer/LIB/SFML-2.5.1/lib -L/usr/lib/x86_64-linux-gnu -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lGLU -lGL -lX11 -lXrandr -ludev -lpthread
*a bit confusing nonetheless.