You can use any markdown syntax in the headers. In the example you provided, the double stars indicate bold. Use single stars to italicize the n. Example below!
library(gtsummary)
packageVersion("gtsummary")
trial %>%
select(age, grade, trt) %>%
tbl_summary(by = trt, missing = "no") %>%
modify_header(all_stat_cols() ~ "**{level}**, *n* = {n}")

To use markdown syntax in the body of a table, you can convert to gt and use the gt::fmt_markdown()
function.
library(gtsummary)
lm(mpg ~ factor(cyl) + am, mtcars) %>%
tbl_regression() %>%
add_glance_table(
include = c(adj.r.squared, statistic, p.value),
label = list(statistic ~ "*F*",
adj.r.squared ~ "*Adjusted R\U00B2*",
p.value ~ "*p*")) %>%
as_gt() %>%
gt::fmt_markdown(columns = label)
