I have a question about celestial coordinates. I have been working on a calculator that takes in different stars and tells you how far apart they are, and their coordinates (x, y, z). But I didn't realize there was no such system. Is there any way to turn celestial coordinates into a coordinate plane, i.e. (x [ly away from earth], y [ly away from earth], z [ly away from earth])?
Rectangular celestial coordinates are used regularly. The most common examples are the JPL ephemerides for solar system objects. Wikipedia's page on geocentric equatorial coordinates includes the equations required to convert right ascension and declination to xyz.
The most commonly used reference system for astrometry is the ICRS coordinates that are closely aligned with the J2000 equatorial system. Implementaions of ICRS were used for the Hipparcos and Gaia astrometry data.