I created a sample dataset to play around with your question.  Here is the dataset I am using:
    library(tidyverse)
options <- c("Yes", "No", NA_character_)
# create the first row of the df that we will be recreating
df <- tibble(
  ID = 1,
  neckpain = "Yes",
  backpain = NA_character_,
  kneepain = NA_character_,
)
# create a function that will help build the entire reproducible df
add.option.sample.row.f <- function( df, n ){
  # FUNCTION add.option.sample.row.f
  # args: df as tibble
  #       n  as integer
  # takes df and adds options to it randomly
  # returns a 4 by n(plus nrow(df)) df of
  # ID (unique), neckpain (charcter),
  # backpain (charcter), kneepain (charcter)
  # - - - - - - - - -- - - - - - - - - - - --
  for( i in 1:n ){ 
    df <- df %>% add_row(
      ID = nrow(df)+1,
      neckpain = sample(options)[1],
      backpain = sample(options)[1],
      kneepain = sample(options)[1]
    )
  }
  return(df)
}
# build sample df
df <- add.option.sample.row.f(df, 500)
head(df)
# A tibble: 6 x 4
# ID neckpain backpain kneepain
# <dbl> <chr>    <chr>    <chr>   
# 1     1 Yes      NA       NA      
# 2     2 Yes      NA       Yes     
# 3     3 No       NA       Yes     
# 4     4 NA       NA       NA      
# 5     5 NA       No       NA      
# 6     6 NA       Yes      Yes 
With this data set lets approach what you are looking to do.  First lets take the questionable columns as a vector:
columns.to.reorder <- c(
  "neckpain",
  "backpain",
  "kneepain"
)
Use mutate to find the cumsum of all na's.
    df %>%
  mutate(
  !!paste0("NA_", columns.to.reorder[1]) := cumsum(is.na(.[[columns.to.reorder[1]]])+0),
  !!paste0("NA_", columns.to.reorder[2]) := cumsum(is.na(.[[columns.to.reorder[2]]])+0),
  !!paste0("NA_", columns.to.reorder[3]) := cumsum(is.na(.[[columns.to.reorder[3]]])+0)
  ) 
Or use the more elegant "across" argument of the newer dplyr
df %>% 
  mutate(across(.cols = columns.to.reorder,
         .fns = function(x)cumsum(is.na(x)),
         .names =  "{col}.{fn}")
  ) 
This will make it easier to find the MAX of each column's na's, as the cumsum will tic each additional na as they occur.  I do not know how you'd like to split the vectors out as each vector's sort would resort the other vectors.  Please advise the direction you are going with this.