  A search for a new charged particle X with mass between 0.3 and 2.0 TeV
decaying to a W boson and a photon is presented, using proton-proton collision
data at a center-of-mass energy of 13 TeV, collected by the CMS experiment and
corresponding to an integrated luminosity of 138 fb$^{-1}$. Particle X has
electric charge $\pm$1 and is assumed to have spin 0. The search is performed
using the electron and muon decays of the W boson. No significant excess above
the predicted background is observed. The upper limit at 95% confidence level
on the product of the production cross section of the X and its branching
fraction to a W boson and a photon is found to be 94 (137) fb for a 0.3 TeV
resonance and 0.75 (0.81) fb for a 2.0 TeV resonance, for an X width-to-mass
ratio of 0.01% (5%). This search presents the most stringent constraints to
date on the existence of such resonances across the probed mass range. A
statistical combination with an earlier study based on the hadronic decay mode
of the W boson is also performed, and the upper limit at 95% confidence level
for a 2.0 TeV resonance is reduced to 0.50 (0.63) fb for an X width-to-mass
ratio of 0.01% (5%).
