Conditional statement doesn't work in node.html.twig
content.field_number is the rendered output and the value of the field is somewhere inside the render array, for example in a #markup. But this will change whenever someone reconfigures the view mode.

It is better to use the node object in this case, because the field value will be available for all view mode configurations:

{% if node.field_number.value %}
  not zero
{% else %}
  zero
{% endif %}