Explanation of Raycast/hit

Hello,
I’ve started developing a basic app for VR and don’t quite know how to implement raycast hits.
I’m trying to interact with my UI elements by using the vr controllers.

From what I understand I’ll need to check if a raycast from the controller hits the element and then pair that with a button press, in order to make the UI react.
I just don’t know how the raycast and the different box collider work, or how it’s implemented.

Is there a good resource where I can learn how? I find videos on how to do it but no explanation on how to use it.
Any help would be appreciated

if you’re using the XR Integration toolkit, Controller to UI raycasts should already be implemented by default with the XRUI Graphic Raycaster and XR Input System components. Are you using it?

Actually not ‍♂️
I assumed oculus integration was good enough. But I’ll look in to it during the weekend, thanks!