I have a Hardtail 29' M Niner 2016, Shimano XT 10 speed, everything is perfect but I always wanted to have that sound from the hub when I go for a ride, so I want to know what I need to upgrade to have that sound?
It's the freehub rachet mechanism in the hub that makes a rapid repeated clicking sound when you stop pedaling. The cassette is not involved as it slides on the splined freehub body and has no moving parts. (Older technology freewheels combined the sprockets and rachet mechanism on on unit though.)
Silent or quieter hubs are usually considered an upgrade. If you really want a noisy hub you can but a replacement hub and have the wheel rebuilt. Wheel rebuilds almost always require new spokes and take a couple hours of labor so it's very often more cost effective to simply buy a new wheel.
As Argenti Apparatus already mentioned, the sound comes from the hub. There are various kinds of springs and ratchets in different hubs. You can use this Youtube playlist with hub sound checks as a guide when selecting your hub. The videos also contain explanation commentary for the features of the sounds.
Instead of rebuilding a new hub to your rim, it will probably be most cost effective to get a new rear wheel with one of the louder freehubs or you could even go for a complete set of wheels so the front & rear wheels have the same spokes & rims.
BUT, Shimano XT hubs are excellent and yes Shimano is noted for making quiet freehubs. I have wheels from Mavic and Fulcrum Racing which are quite loud. Both of these brands make excellent wheels and charge accordingly.