get_query_var(‘s’) not working

Probably you need to use the following function somewhere in your template, whether in functions.php or somewhere.

function add_query_vars_filter( $vars ){
  $vars[] = "s";
  return $vars;
}
add_filter( 'query_vars', 'add_query_vars_filter' );

It’ll avail your s parameter from the URL into the get_query_var('s').