To enable the discount code to be available on a specific form, you must visit the Registration Types tab or the Donation Levels tab (depending on if you are using a registration form or a donation form type).
From there, scroll down to the Payment Details section and click the edit icon. Up in the top left, you will see the toggle that will allow you to enable or disable the application of discounts.
If you are using a Registration form type, the configurable options will be under the 'Discounts' tab at the form level. If you are using a Donation form type, the configurable options will be under the 'Giving Codes' tab at the form level.
However, the Registration form itself will not display a list of all possible discount codes that have been enabled on that form.
The intent is to allow your business to determine the publishing/distribution of discount codes to the appropriate audiences (for example in emails, printed materials, other pages on your website). If a potential registrant is aware of the code when they arrive at the form, then they can type it in while completing the form.
When they click the 'Apply Code' button, if the code they entered is still valid for the form (i.e. it hasn't expired either by max usage or by date) then the discount will be applied and the code itself will be shown as applied on the form in the payment section.