If there is only one categorical variable as predictor in the regression model, is the predicted outcome always same as the average of the level? I have read somewhere that it is acceptable to have only one categorical variable as a predictor in the regression model.
From my understanding, does it mean that the predicted outcome using this regression model will be always the same as the average of that level? If so, does it mean that the R squared value and p value of this model are not informative?

I ASSUME ORDINARY LEAST SQUARES
You are correct that if the only predictor ($x$) variable in the model is a category with multiple levels, the model will make the same predictions as you would get from making predictions by calculating the mean of each level.
set.seed(2022)
N <- 100
x1 <- rep("bat", N)
y1 <- rnorm(N, 0, 1)
x2 <- rep("cat", N)
y2 <- rnorm(N, 1, 1)
x3 <- rep("dog", N)
y3 <- rnorm(N, -1, 1)
x <- c(x1, x2, x3)
y <- c(y1, y2, y3)
L <- lm(y ~ 0 + x) 
summary(L)
mean(y1)
mean(y2)
mean(y3)

Notice that the regression output gives the same estimates as the mean estimates.
However, the $p$-value and $R^2$ are meaningful. For the $p$-value, that is the $p$-value for the regular (one-way) ANOVA of the groups. For $R^2$, that has the same interpretation as usual: a ratio of the variance in $y$ explained by the predictors to the variance in $y$ when we do not consider the features.
