Some of the ways I couldn't understand achieved the desired effect : (
ggplot() +
geom_raster(
data = terra::as.data.frame(x[[1]], xy = TRUE) |>
mutate(x1 = x - 180),
aes(x = x1, y = y, fill = lyr.1)
) +
geom_sf(data = st_break_antimeridian(st_as_sf(a), lon_0 = 180)) +
coord_sf(
crs = "+proj=longlat +datum=WGS84 +lon_0 = 180",
default_crs = sf::st_crs(4326),
expand = FALSE
)