System Preferences → Trackpad → Scroll & Zoom → enable Rotate.
Open an image in Preview → Tools → Annotate → Text.
After entering desired text and with the text box still selected, use the rotate gesture to turn it as desired.
For more fine-grained control, use Pixelmator (Add text on a path) or Acorn (Path Text | video tutorial).
H/T: blueswirly and Zabobon
While macOS apparently does not natively support rotating text or shapes in Preview by mouse, the Logitech MX Master 3 (among other models) provides a workaround: set the Gesture button (the small button on the thumb rest) to Zoom/Rotate in Logi Options or the newer Logi Options+.
/mac | Sep 08, 2022