You can't without knowing the distance to the star, $d$.
Once you have that then, depending on exactly how the $x, y, z$ axes are defined: $$ \begin{align} x &= d \cos(b)\cos(l) \\ y &= d \cos(b) \sin(l) \\ z &= d \sin(b)\ , \end{align} $$ where I have used a usual convention that $x$ is measured towards the Galactic centre from Earth, $y$ is measured at right angles to this but in the Galactic plane and $z$ is perpendicular to the Galactic plane.
If you wish to have the origin at the Galactic centre then simply subtract the $x$ coordinate of the Galactic centre from $x$.
Where might you find those distances? Well, you haven't said what stars you are trying to find the positionsreciprocal of the parallax in the Hipparcos catalogue gives you an estimate of the distance. It isn't very precise or accurate for many stars though. A goodbetter source of parallax data for roughlywould come from a billion stars iscross-match with the Gaia DR3 catalogue. The parallaxes can be transformed to a distance (an approach to this is provided by the catalogue of Bailer-Jones 2021). If you are just working with stars in the Hipparcos catalogue, then that catalogue also contains (less precise) parallaxes, the reciprocal of which gives an approximate value of the distance.