Yes — nesting, custom properties, container queries, @layer, color-mix() and the oklch() colour space all format correctly, because Prettier's postcss parser tracks the current CSS syntax rather than a fixed keyword list.
Can it format SCSS or Less?
This page uses the strict CSS parser. Most SCSS will still format, but SCSS-only syntax such as @mixin, @each and nested &-selectors with interpolation may be rejected. Plain CSS nesting is supported.