I would lag the Close (or AdjClose) column and calculate as in the following code.
library(dplyr)
DF <- data.frame(Close = c(45.6, 46.7,44.3, 41.7, 45.2))
DF
#> Close
#> 1 45.6
#> 2 46.7
#> 3 44.3
#> 4 41.7
#> 5 45.2
DF <- DF |> mutate(PrevClose = lag(Close))
DF
#> Close PrevClose
#> 1 45.6 NA
#> 2 46.7 45.6
#> 3 44.3 46.7
#> 4 41.7 44.3
#> 5 45.2 41.7
DF <- DF |> mutate(Return = (Close - PrevClose)/PrevClose)
DF
#> Close PrevClose Return
#> 1 45.6 NA NA
#> 2 46.7 45.6 0.02412281
#> 3 44.3 46.7 -0.05139186
#> 4 41.7 44.3 -0.05869074
#> 5 45.2 41.7 0.08393285
Created on 2022-03-25 by the reprex package (v2.0.1)