Apple id is your virtual account in Apple server. This accounts saved all your information like which device you are using and when. With the help of this id, you can recover all your device information.
When you have created apple id first time it asked some information like your recovery phone number and emails.
Use those emails and numbers to recover your forgotten Apple id.