Game-Controlled Cameras C++

Hi all! I have studied this topic.
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/CPPTutorials/AutoCamera/
And I got into serious trouble.
In this tutorial, I have to manually assign a variable to each camera in the editor.

The problem is that I don’t have a second camera on the stage, it is created by pressing a button in the game itself. How do I switch the view to the second camera that was generated?