It seems to be on top of a platform that's run out of power.
Hmm...
There's an energy pellet bouncing around.
Don't pellets tend to leave a mark on the walls?
Shoot one portal at the scorch mark, and another at the glowing orange light on the ceiling. This will get the platform moving.
A portal-friendly surface on the ceiling will let you grab the other cube, but activating the buttons is another matter entirely.
Guide help
This is the low-spoiler guide for "Grabbing the other cube" puzzle in Portal. Unlike in normal walkthrough, you get gradual hints on how to solve the puzzle. Click the big button below to see your first hint. If the hint contains a spoiler, you will be warned about it before clicking.
Hi! I have written video game guides since 2018. Any money I make here will go towards improving my equipment so I can make the things you enjoy even better (and faster!)