Most people don't need to decide between buying or renting, it's already decided by default, because they'll only ski a few days a year. The question that really matters isn't that one, it's another: how to rent well, so you don't end up with gear that doesn't match your level or boots that ruin your day.
Renting is, by far, the most sensible option for most people, for several very concrete reasons:
At most rental shops you'll find the gear grouped into a few categories, designed so you don't need to know anything about skis to choose well:
A simple trick for sizing, if you're asked or can choose: for beginners, a shorter ski (below your own height, 10 to 15 cm less) turns more easily; as you move up in level and speed, a slightly longer ski gives you more stability. There's a third factor, torsion (the ski's ability to twist around its own axis and return to shape), but as a beginner it's not worth spending even a minute on, that's for very advanced skiers. The shop itself usually adjusts the size for you based on your height, weight and stated level, so all you need to do is answer those questions honestly.
If you're renting a board, the essentials for a beginner are two things: the board, standing upright, should reach roughly between your chin and your nose, and the flex (stiffness) should be soft or medium, a stiff board is designed for advanced level and forgives the edge mistakes typical of the first few days much less. As with skis, the shop itself usually adjusts this for you based on your height, weight and level, so the part that really depends on you is telling the truth about how much experience you have.
Of everything you rent, boots are what can ruin your day the most if you get them wrong, and curiously, what people spend the least time properly trying on. Unlike skis or a board, there are no level categories for boots, the only thing that matters is that they fit your foot well.
Try them on with the thin sock you'll actually wear on ski day, not a thick sock you'd wear around the house, because it changes the feel of the fit quite a bit. Adopt a skiing stance (ankles flexed, knees slightly forward, weight pushed towards the shin) to check that your foot doesn't move inside the boot and that the pressure feels even, with no specific points of pain. If you feel your foot moving around inside the boot, ask for a different size or fit before leaving the shop, it's the one piece of the whole rental where it's genuinely worth spending five extra minutes trying it on properly.
This is a point almost no one explains well, and it has a direct bearing on your safety. Bindings (for both skis and snowboards) are set according to a technical standard (DIN ISO 11088) that calculates, from your weight, height, age and stated level, the exact pressure at which the binding should release your foot in a fall. If they release under too little pressure, they'll pop open on their own unnecessarily; if they release under too much, they won't open when you actually need them to, and that's what causes a good share of knee injuries.
For this reason, it's essential that the details you give at the rental counter are real, not an "improved" version of your level or your weight. Claiming a higher level than you actually have won't make you ski better, it will just mean your bindings are set for someone who isn't you. With children this point is even more delicate, because their weight changes from one season to the next, never reuse last year's setting without going through the shop's check again.
Almost all rental shops offer an optional damage waiver (usually a few euros a day) that covers accidental damage to the gear during your rental, a chipped edge from a rock, a binding damaged in a fall, that kind of mishap. It's not mandatory, but it's usually worth it if you're going to ski several days in a row, because without it you bear the repair cost yourself if the gear gets damaged, and it can end up costing quite a bit more than the waiver would for the whole trip.
Note that this is different from ski or travel insurance covering personal accidents, on-slope rescue or medical expenses, the rental shop's waiver only protects the gear you're wearing, not your body. If you don't already have insurance covering ski accidents (through your federation, your travel insurance, or a specific winter sports policy), that's a separate matter worth sorting out before hitting the slopes, not something the rental waiver replaces.
Getting the boots, bindings and size right won't do much good if no one corrects your technique afterwards. Well-chosen gear makes the day comfortable; the right instructor is what makes you actually learn.