Personally I use shape traces (line traces can clip through object seams if the collision boxes don’t fully block out stuff like wall pieces, and considering Epic’s FBX guidelines advocate for leaving small spaces between colliders, you will likely have gaps). The first trace is small, and if it doesn’t hit anything, I do a bigger trace, and finally, the biggest trace. That way the object the player is looking at should be the one most likely to be highlighted.
If you have some other kind of gameplay where the player doesn’t have a clearly controllable camera viewport to target at interactable objects, like a top-down game without a mouse cursor, I would just store the interactable objects in the array and prioritize the object the player has the shortest distance to. If player interacts with an item and it disappears you can then still see if there’s something left in the array.