Well, depending on what VR setup you have I can either help you set it up or it might be impossible.
Portal 2 in VR runs on a PC (a pretty good gaming PC) connected to the headset either through a cable or wirelessly. If that's the setup you're using, it shouldn't be too hard to figure out.
If you have an Oculus/Meta Quest and only play standalone (that is, no PC is involved, everything runs on the headset), then I'm afraid that's not good enough for Portal 2 or Half-Life 2, though there is a VR port of the original Half-Life. All you'd need for that is any PC (even potato quality) and a USB cable.
Ah, it is Meta Quest 3. I haven't used it much. I got to play a couple levels of Portal 2 a very long time ago. It was one of the very few video games I actually enjoyed. I don't know anything about Half-Life. I'll ask him if he knows about it first.
Ah, ok. Playing the original Half-Life in VR is great for the nostalgia value, though probably not that great if you're not familiar with the game itself. There's a bunch of great VR ports of old games for the standalone Quest by developers calling themselves "Team Beef". Doom 1, 2 and 3, Return to Castle Wolfenstein, Quake 1, 2, 3 AND 4, Jedi Outcast, Jedi Academy... the original Tomb Raider is coming soon too.
The real draw is to see those familiar game worlds from a new perspective.