A study of the anomalous couplings of the Higgs boson to vector bosons, including CP\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$${\ extit{CP}}$$\\end{document}-violation effects, has been conducted using its production and decay in the WW channel. This analysis is performed on proton–proton collision data collected with the CMS detector at the CERN LHC during 2016–2018 at a center-of-mass energy of 13 TeV, and corresponds to an integrated luminosity of 138fb-1\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$\\,\ ext {fb}^{-1}$$\\end{document}. The different-flavor dilepton (eμ)\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$({\ extrm{e}} {{\\upmu }})$$\\end{document} final state is analyzed, with dedicated categories targeting gluon fusion, electroweak vector boson fusion, and associated production with a W or Z boson. Kinematic information from associated jets is combined using matrix element techniques to increase the sensitivity to anomalous effects at the production vertex. A simultaneous measurement of four Higgs boson couplings to electroweak vector bosons is performed in the framework of a standard model effective field theory. All measurements are consistent with the expectations for the standard model Higgs boson and constraints are set on the fractional contribution of the anomalous couplings to the Higgs boson production cross section.