Grease. Allows the parts to come together smoothly, allows the threads to glide properly, seals out water, prevents corrosion, makes sure you can remove the parts again later.
Carbon assembly paste increases friction. It’s only really needed to prevent slipping for parts with low clamping force. The prime example are seatposts but it can also be useful for handlebars or stems.
If bearings or other parts are not seated perfectly (which leads to creaking) you can use retaining compound (e.g. Loctite 641).