How gNB intialize/select RACH common config parameters?
For SA deployment, random access parameters are broadcasted on SIB1 while the device is in Idle Mode. For connected mode, the UE shall receive through RRC Reconfiguration
However, for NSA deployment such parameters are sent trough RRC reconfiguration on LTE side.
The UE must follow strict rules to apply RA parameters (defined at 38.321 and 38.211). You might also find some clarification: