This is covered somewhat in this answer. Chapter 4 of Frank Harrell's class notes provides much more useful advice on working with multiple predictors.
If you want to evaluate all genes together, ridge regression is a useful choice. You can think of this like PCA in that correlated predictors tend to be in the same principal components, but the components are weighted continuously instead of selected in-versus-out.
If you want to identify a small subset of genes, LASSO will tend to select one out of a set of correlated predictors. Yes, that's a very noisy process in that the particular gene selected from a correlated set might vary from data sample to data sample. But that can work OK in practice for prediction, and it allows you to do things like find genes to develop practical tests that are less expensive than whole-transcriptome analysis. There's also a hybrid between ridge and LASSO called the elastic net. Chapter 6 of An Introduction to Statistical Learning provides background on these and other methods.
You do not do that directly in the R survival
package. These methods are implemented for example in the glmnet
package for a wide variety of regression models including Cox.
Finally, make sure to include relevant clinical predictors along with gene expression in your model. There's a risk that your gene-expression values will just be serving as a proxy for clinical status as it's evaluated in the standard of care. Thus you need to show that the gene-expression data add something useful for prognostication or for understanding disease progression or therapy resistance.