In the first part, I will recall the definitions of stacks of shtukas and their cohomology, and explain why they are useful for the Langlands correspondence for function fields. In the second part, I will talk about the finiteness properties and smoothness property of the cohomology of stacks of shtukas.