The nature of principle components is that all genes will be involved. If you mean to pick out the top5, be sure they're scaled or you'll just get the highest expression genes. The Principle Components analysis must have the genes factors, and you'd have to pick out the ones with max absolute value coefficient. Not sure about WCGNA, this is for plain PCA, which we presume is inside WCGNA.
Now that you have code
pZ <- prcomp(X_black, rank. = 3) #to get 1st 3 components
So you are just using prcomp, which is part of base R.
pZ$rotation will get you the loadings for the genes for each PC
With signed netwroks, In WGCNA the genes that mostly contributes to the 1st PC are the ones with the highest Module Membership or Intramodulat Connectivity
For Unsigneed networks, the genes that mostly contributes to the 1st PC are the ones with the highest absolute value of Module Membership or Intramodulat Connectivity