'Once' is 'one' + an old '-s' suffix — and 'once upon a time' is literally 'one time upon a time.'
On one occasion or for one time only; at some time in the past; formerly.
From Middle English 'ones,' from Old English 'ānes,' the genitive singular of 'ān' (one). The literal meaning is 'of one (time),' i.e., 'one time.' The '-es' is a genitive suffix (not a plural), the same adverbial genitive seen in 'twice,' 'always,' 'sometimes,' and 'besides.' The spelling changed