Add capacitor-moengage-core plugin to capacitor project as shown below :
$npm install capacitor-moengage-core
Once the plugin is installed run npx cap sync to update capacitor native platform(s) and dependencies.Follow the Capacitor framework’s guidelines for adding plugins.