Hello, do you have experience achieving a random forest prediction task in a non-shiny context ?
If not I recommend you pivot to a non-shiny script, and perfect a script for yourself that can complete an example of the task you are aiming to put in a shiny context.
If you are confident with random forest prediction tasks in general, and it is the integration to shiny that is particularly challenging you then in that case, to help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at these resources, to see how to create one for a shiny app.
I would strongly urge you to make any such example as minimal as possible, i.e. use R's built in datasets for example data where this remains a meaningful analog to what you want to achieve etc.