Use barplot in an lapply. split the data by year and plot the values according to their order. We also give the bars col=ors according to this scheme as well as labels using mtext.
Colors and labels may be conveniently stored in a matrix m with row names by categories that we can easily match later.
(m <- matrix(c('#3C79A7', '#8ECBE9', '#FB4C58',
"Category 1", "Category 2", "Category 3"), 3, 2,
dimnames=list(sort(unique(data$categories)), NULL)))
# [,1] [,2]
# category 1 "#3C79A7" "Category 1"
# category 2 "#8ECBE9" "Category 2"
# category 3 "#FB4C58" "Category 3"
S <- split(data, data$year)
op <- par(mfrow=c(1, 2), mar=c(2, 6, 4, 2)) ## par: 2 plots, expand margins
lapply(names(S), \(x) {
s <- S[[x]]
u <- order(s$value)
barplot(s$value[u], horiz=TRUE, col=m[s$categories[u], 1], border=NA,
main=x[1], xaxt='n', yaxt='n', ylab='')
mtext(m[s$categories[u], 2], 2, 1, at=seq_len(nrow(s)), las=2)
})
par(op) ## reset pars

Data:
data <- structure(list(year = c(2020, 2020, 2020, 2021, 2021, 2021),
categories = c("category 1", "category 2", "category 3",
"category 1", "category 2", "category 3"), value = c(7, 10,
5, 11, 8, 7)), class = "data.frame", row.names = c(NA, -6L
))