Use value from buildForm() in submitForm()
Typically, the $form_state object can be used to stash that data. $form_state->getStorage() references a simple array that you can put whatever you like inside, which you can then retrieve in submitForm() the same way.