How to get the axial tilt vector(x,y,z) relative to ecliptic
Earth is a special case since the equatorial and ecliptic coordinate systems are defined in terms of its own rotation and orbit.
Earth's north pole vector in
equatorial coordinates is
$$\vec N_{\oplus,eq} = (0, 0, 1)$$
To transform this to
ecliptic coordinates, we rotate about the $x$ axis by the obliquity $\varepsilon$ = 23.44$^\circ$ and get
$$\vec N_{\oplus,ecl} = (0, \sin \varepsilon, \cos \varepsilon) = (0, 0.3978, 0.9175)$$
In a spherical coordinate system, two angles define a unique direction.
In equatorial coordinates these are the right ascension $\alpha$ and declination $\delta$.
This IAU report, table 1,
gives $\alpha$ and $\delta$ values for each major planet's north pole as of 2000-01-01 and formulas to compute them for other years.
To convert these to rectangular form
$$(x_{eq}, y_{eq}, z_{eq}) =
(\cos \alpha \cos \delta,
\sin \alpha \cos \delta,
\sin \delta)$$
Then if you want J2000 ecliptic coordinates
$$(x_{ecl}, y_{ecl}, z_{ecl}) =
(x_{eq},
y_{eq} \cos \varepsilon + z_{eq} \sin \varepsilon,
z_{eq} \cos \varepsilon - y_{eq} \sin \varepsilon)$$
But if you want another planet's orbital plane to be the $xy$-plane,
then you also need the orbit's inclination and longitude of ascending node;
I leave that transformation as an exercise for the motivated reader.