PCA can make VIF worse? Why is it so often sold as a multicollinearity fix? It's the conventional wisdom that a PCA transformation can cure multicollinearity. Putting this into practice on example data, I find myself confused. In the following case, applying PCA seems to have made the multicollinearity (as measured by VIF) much worse!
library(regclass)
library(car)
library(tidymodels)

data("WINE")

##Dropping rating variable

data<-WINE[,-1]

vif(lm(alcohol~.,data=data))

If we are going by the conservative benchmark that VIF of 2 or greater presents multicollinearity that needs to be removed, we need to do something to remove it.

Let's apply PCA.
##3 Varibles with vif over 2, would like to remove that multicollinearity. Let's try pca.

withpca<-recipe(alcohol~.,data=data) %>% step_pca(all_predictors()) %>% prep() %>% juice()



vif(lm(alcohol~.,data=withpca))

#multicollinearity is now much worse!

What has gone wrong? The VIFs for PC1 and PC4 are now astronomical! Can someone explain whether I've misunderstood the conventional wisdom about PCA and multicollinearity or whether that conventional wisdom is just wrong?

 A: It seems that I've made a rookie mistake. It's generally recommended to prep the data before PCA by standardizing it first. Some implementations of PCA automatically do so. This one does not, apparently.
withpca<-recipe(alcohol~.,data=data) %>%step_center(all_predictors())  %>% step_scale(all_predictors()) %>% step_pca(all_predictors()) %>% prep() %>% juice()


vif(lm(alcohol~.,data=withpca))

Now the VIFs look perfect.
A: Principal Components Analysis is sensitive to the scaling of the variables (variables measured on different scales and with different variances). Scaling is recommended when computing PCs by singular value decomposition (see stats::prcomp).
Now, compute the principal components for your data with and without scaling and then inspect the loadings for PC1 ('rotation' for stats::prcomp). Without scaling, the variable with the largest variance has the largest loading. With scaling, the loadings will be quite different.
Next, look at the bivariate correlations between the variables and the principal components (best done with scatterplots). That will show you which PCs are strongly correlated with which variables. However, for some data I am looking at, the PCs aren't strongly correlated with one another (they shouldn't) but then bivariate correlations are not necessarily reliable indicators of variance inflation. Also keep in mind that VIFs change as you drop variables.
Finally, you need to consider if the PCs have a meaningful interpretation for communicating the the results of your model. It might be better to use the original variables and drop those with large VIFs in a step wise manner.
I'm (obviously) not a statistician but it seems that you did make a rookie mistake in not scaling the variables for PCA.
