  We study the question of whether the Brauer group is isomorphic to the
cohomological one in spectral algebraic geometry. For this, we prove the
compact generation of the derived category of twisted sheaves for quasi-compact
spectral algebraic stacks with quasi-affine diagonal, which admit a
quasi-finite presentation; in particular, we obtain the compact generation of
the unbounded derived category of quasi-coherent sheaves and the existence of
compact perfect complexes with prescribed support for such stacks. We also
study the relationship between derived and spectral algebraic stacks, so that
our results can be extended to the setting of derived algebraic geometry.
