From @Axeman comment:
ggplot(mtcars, aes(x = mpg, y = disp, color = carb, shape = as.factor(am), size = vs, fill = cyl)) +
geom_point() +
guides(color = guide_colorbar(theme = theme(legend.title = element_text(size = 4, color = "red"))),
shape = guide_legend(theme = theme(legend.title = element_text(size = 8, color = "green"))),
size = guide_legend(theme = theme(legend.title = element_text(size = 12, color = "yellow"))),
fill = guide_legend(theme = theme(legend.title = element_text(size = 16, color = "orange")))
)
and here is the official documentation: https://ggplot2.tidyverse.org/reference/guide_legend.html