You are attempting to access to value of the field outside of “The Loop”. This means that ACF will not know what post to get the value from and you must supply that.
$queried_object = get_queried_object();
if (is_a($queried_object, 'WP_Post')) {
$value = get_field('field_name', $queried_object->ID);
}