First you need to know the crystallization system of your sample. Cubic, monoclinic, orthorhombic, or etc.
You can perform rietveld refinement to obtain the lattice parameters, which is a very reliable way to do it.
However, knowing the crystalline system you can obtain the lattice constants with a more manual calculation, employing the formula that correlates d spacing and lattice parameters for your particular system. You can find an image attached showing the equations for each particular system.
Where d is your d spacing regarding the hkl plane that you are using. The more complex the system, more planes will need to be used. So you will have a mathematical system with 2 variable and 2 equations, and so on.