How to find correlation between multi-variate spatial data? the spatial data is in raster format and I couldn't find any base code to perform the same in R
Can you specify what "multivariate spatial data" are? Spatial data are just coordinates or a projection into a cartesian system, i.e. they are of the format (X,Y).
Turning back to your question, have you thought about the Mantel test? The Mantel test is just a correlation between two similarity or dissimilarity matrices and returns a Pearson r. Please, see also the paper
Article Should the Mantel test be used in spatial analysis?
by Legendre et al. 2015 and how the Mantel test can be applied to spatial data.
This is just a little addition to the useful answer of Łukasz Walas . If you want to calculate the Condition Number, you can use function kappa(). In contrast to usdm::vif(), it does not work for Raster* objects, so you should first convert it to matrix or data.frame with as.matrix() or as.data.frame(). The conversion is also needed if you want to calculate VIF by car::vif() or correlation matrix by Hmisc::rcorr() (i.e. if you need significance of the correlation coefficients as well).