separate_wider_position()

df4 <- tibble(x = c("202215TX", "202122LA", "202325CA")) 
df4 |> 
  separate_wider_position(
    x,
    widths = c(year = 4, age = 2, state = 2)
  )
## # A tibble: 3 × 3
##   year  age   state
##   <chr> <chr> <chr>
## 1 2022  15    TX   
## 2 2021  22    LA   
## 3 2023  25    CA