There are a few ways to do this. If you have a model that takes a long time to train and you want to use it in another place, you can use R's RDS file format to save the model as a file and load it in the future without having to train it again.
# Create a model and save it to a variable
model_lm <- lm(mpg ~ ., data = mtcars)
# Store the model as an RDS file
saveRDS(object = model_lm, file = "model_lm.rds")
# Load the model from file
model_lm2 <- readRDS("model_lm.rds")
# Use the model however you want
predict(object = model_lm2, newdata = mtcars)