Search for charged-lepton flavor violation in the production and decay of top quarks at $\sqrt{s}$ = 13 TeV with the CMS detector