How to obtain an alpha-numeric endorsement code to give to my potential arXive endorser
Whether you will need an endorsement code or not depends (among other things) to which category you submit to, which suggests that you will be given an endorsement code during the submission process (if necessary). The help page also mentions "during the submission process".