Q.Cutting top of a plant
Can I cut the top of this mahonia
plant and plant the cutting in the garden?

Yes, Mahonia can be grown from cuttings. Semi-hardwood (also called semi-softwood) cuttings are best for Mahonia. These articles explain how to take the cuttings and root them, then plant them:
https://www.gardeningknowhow.com/garden-how-to/projects/rooting-plant-cuttings.htm
https://content.ces.ncsu.edu/plant-propagation-by-stem-cuttings-instructions-for-the-home-gardener
http://hortupdate.unl.edu/Cuttings1