You can buy Portal 2 yourself from around age ten, which matches its ESRB rating of E10+.
That rating reflects the game's content rather than any legal restriction, so a retailer is unlikely to refuse the sale on age grounds.
Online stores generally do not check at all, though anyone under the platform's minimum account age will need an adult to make the purchase.