when entering a number with a leading zero, the zero is not displayed. eg account numbers

how do define a format that retains leading zeros.

Either enter the number with a leading ' apostrophe to force it as text input, or format the cell as Text using the @ number format before entering input. Assuming you’re talking of Calc (your tag only says common).