Before JIRA Cloud a user could be in Backlog of a board, hover over the sprint heading and view the sprint code numerical value in the bottom left hand corner. (Chrome or Edge).
JIRA Cloud is not presenting with this function and sprint codes cannot be easily located or presented in a report.
The examples on help are for when a sprint is active already or has cards already but the purpose of needing a list of sprint codes is to complete a bulk upload template for large projects to assign story/cards to the correct sprint.
JQL Query has been advised as an option but this is time consuming to find a sprint code for many sprints in Backlog.