Something like this will change numeric NAs to 0.
library(dplyr)
data <- starwars
data_clean <- mutate(data, across(where(is.numeric), tidyr::replace_na, 0))
We are mutating across all numeric columns. To each we apply "tidyr::replace-na", which replaces NA with something. In this case we replace with 0.