(Assuming that "sliding" is an unintentional wording. Unless the street is frozen with ice, a car normally never slides downhill.)
If the gear is in neutral (i.e. no gear engaged) then it is very normal for the car to roll downhill if the parking brake is not engaged.
If the parking brake is engaged and the car still rolls downhill, the brake is either broken or adjusted badly. In either case, this needs fixing.
Modern parking brakes are a kind of nuisance in that respect because nowadays everything must be "smart" with microchips, blinking lights, and little electro motors. On a "traditional" parking brake, there's an iron wire attached to the lever with two screws. Open screws, pull cable a bit tighter, close screws, done. On a modern brake, prepare to pull your wallet.
That being said, the parking brake, in my opinion, shouldn't be used for parking in the first place. Yes, your driving instructor tells you that, but either way...
The first gear is mighty fine for holding your car in place. The reverse gear also works, and in theory would be "even better" (some super smart cars indeed force you to use that one), although when something is already perfectly good, then there is no such thing as "even better".
The first gear is preferrable insofar as it is easier to engage, less obnoxious to the transmission levers, and less irritating to other traffic participants. And since it is just good enough, there's no need to do anything else.
I've used nothing else for two decades (well, I'd say 3 decades, but since about a decade I'm only driving on manual transmission occasionally so that doesn't count).
The reverse gear is more difficult to engage, it will cause the white light on the back of your car to light up (which is irritating to others!) and it is more stressful overall.
The parking brake has the downside that if you engage it during winter (outside, not in your garage) and you come back some hours later, you may get a funny surprise for free because now your car is unusable with a frozen-up parking brake. Likewise, if you park your car with parking brake engaged and something happens (something, anything, like... you go to hospital or on holiday) and you leave your car there for a couple of weeks, you may equally get a nice surprise upon returning. Usually an unpleasant, scary noise as the brake breaks free. While not a real problem, it's more scary and annoying than it needs to be.