How does UE obtain resources information to transmit Msg3?

Hello Experts.

How does UE obtain resources information to transmit Msg3?

Hi…
MSG3- RRC connection Request that’s 48 bit - 40 bit UE ID and 8 Bit message cause - MO call/MT Call / Emergency Etc.
Now-
To obtain the resources UE performed RACH…
after RACH → RAR (random acess response) is provided- UL Grant RB’s / TA/ CRNTI…
UL Grant makes the RB’s available to Transmit msg3 in the UL direction.
the information that was sent inmsg3 is UE ID+ Cause.