There are a few steps to planting trees or shrubs on a steep slope.
Start by choosing an appropriate species for the area you live in. The tree or shrub you pick should be adapted to your climate and soil conditions, and  have strong root systems since it’s being planted on a slope.
Then you’ll need to dig a hole large enough to fit the root systems and build up flat areas into the slope to reduce erosion and help water retention. Position the tree upright and backfill with a mix of soil and compost, and stake it up if you need to.
Once the tree is planted, staked, and supported with soil, apply a layer of mulch around the base to help water retention and prevent weeds. Water the plant regularly.