Modeling longitudinal and time-to-event data together has, oddly enough, an understandable name: "joint modeling." The CRAN Survival Task View has links to several implementations. You might consider Bayesian approaches like those in the rstanarm package, which has a vignette on that topic, or JMbayes. Bayesian approaches have the advantage of forcing you to think through your assumptions carefully before you start and of not tying you to the sometimes arbitrary choices about "significance" typical of frequentist modeling.
Predictions from joint models can be difficult for several reasons.
First, for any one individual, the wide underlying distribution of baseline time-to-event values can overwhelm the covariate-associated differences in time-to-event distributions that you model.
Second, time-to-event models typically work with current covariate values, so if the history of a covariate is important then you have to find a way to turn that history into a current value.
Third, there can be a serious risk of survivorship bias. If you have a longitudinal covariate value for an individual at some time point, that individual is presumably still alive at that time point. That's fine for building a model, but can pose problems for predictions. Even in the simpler scenario of (unmodeled) time-varying covariate values, the author of one widely used survival-analysis package refuses to allow for predictions based on time-varying covariates. See this page for his rationale and some discussion.