The shortcut first makes sure you are running the current version of the shortcut to prevent you from requesting something from the server that might have potentially been changed.
Then, it asks what you would like to search on youtube. It then sends this data to my personally hosted server that web scrapes Youtube for the title and links and it returns them as a dictionary to be used in the Shortcut.
After that, it asks which one would you like to watch which would send your word "number" to my server so it can translate it to an actual number to be used to get the url from the dictionary received earlier.
Finally, it goes through the dictionary to check if it finds the a match from the number you said with the number used as the increment and if it finds a match it will open the link in that current iteration of the dictionary.