What is cross-spectral density- CSD?
Power-Spectral Density is the distribution of power along the frequency axis.
It is generally used for non-finite energy signals (mostly not limited in time signals), who aren't square-summable.
The signal's PSD is the autocorrelation of the signal's Fourier Transform, as stated by the Wiener–Khinchin theorem.
In Matlab:

N = length(S);
F = fft(S);
F = F(1:N/2+1);
PSD = (1/(2*pi*N)) * abs(F).^2;
PSD(2:end-1) = 2*PSD(2:end-1);
freq = 0:(2*pi)/N:pi;


see: https://de.mathworks.com/help/signal/ug/power-spectral-density-estimates-using-fft.html

Cross-Spectral Density is the same, but using cross-correlation, so you can find the power shared by a given frequency for the two signals using its squared module, and the phase shift between the two signals at that frequency using its argument.

Cross-Spectral Density can be used to identify the frequency response of a noisy LTI system : if the noise is not correlated to the input or output of the system, its frequency response can be found from the CSD of the input and output.