How do I format a cell to accept the number zero as the first entry

When I fill the cell 0787 and move on to the next cell. The number 0787 deletes the beginning zero. How do I format the cell to accept the number as entered?

Generally sequences of digits starting with one or more zero digits are not treated as numbers but in the same way as text is. A typical example is the so-called phone-number which often has leading zeroes, but also often additional formatting elements like spaces or dashes.
Therefore you need to decide first of all if you actually want to enter a number suitable for calculations (internall represented in a completely different way) or a text roughly looking like a number.
If the choice is “text” the respective cells should be set in advance to the format code @ described Text, and meaning: “Don’t try to interpret the entered content as a number!”

Select Format>Cells...

Specify the number of leading zeros.

Sorry for my German-UI

Use the “0000” numeric format code in the applied cell style.

Or format the cell (by a cell style) as Text - if you not needed to do any calculations with the cell content.