The reviewing and editorial policies of each journal vary and this depends on the subject area and scope of the journal. It is possible to encounter the same editor in two journals, however, there is usually no custom to acknowledge the previous submission to a different journal. Journal editors handle large volumes of research every day and it might be possible that they simply don’t remember your previous submission.
You can go ahead with submitting your manuscript to the new journal as a fresh submission. There is no need to mention anything specific about your previous rejection in the cover letter.