Hello for first
Hi and welcome!
To "build" a cube, you would need to have (up to) six faces, or quads. Quads are made up of two triangles.
Using SFML, you can use a vertex array to draw quads. If you already know how to calculate the vertices' positions, the hardest part might be deciding on which order to draw the faces.
Note that texturing a quad can be harder that it might at first seem. Solid colours are much easier.
If there are any better libaries or functions to do that?
Selba Ward's Sprite 3D can help with rotating textured faces (using SFML).
To "do it properly", however, you can use OpenGL directly.
Note that
one of SFML's examples is a rotating cube...