From what I understand, if you pre-order a physical copy, you'd either get the beta code on your receipt or get an e-mail with a code. If you pre-order a digital copy, you should be ready for the beta as soon it is available on the platform you've pre-ordered it on.
However, do remember the beta is PS4 and Xbone only. No beta on PC/Steam or Switch.
Contact the place you've pre-ordered from to be sure though.