R coding: creating a name variable to use with select

I am wondering if this is correct:

VAR <- c("City")
data %>% 
  select(salary, age, VAR)
  melt(id.vars = c("Salary2", "Age2","City")) -> finalData

I get the message:

Note: Using an external vector in selections is ambiguous.
ℹ Use `all_of(VAR)` instead of `VAR` to silence this message.
ℹ See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.

The resulting finalData seems correct, but I wonder if this is the way to go.