Order matters. I recommend applying Denoise early in the workflow, before healing and masking. AI-driven, image-based features such as Content-Aware Remove and Select Subject can be affected by noise, so it’s best to use those features on a clean starting point. If you do run Denoise on an image that already has Content-Aware Remove settings or AI masks, Denoise will automatically update those spots and masks. This is handy, but be aware that the content of those spots and masks may change unexpectedly, so it’s best to review the results carefully.
On a related note, Denoise can sometimes subtly change the overall tonality of the photo, especially by cleaning up the shadows. If your source photo already had major tonal adjustments, such as with Shadows, Clarity, or Dehaze, you may need to revisit those settings after applying Denoise.