macOS upgrades do not happen automatically. They must be manually initiated.
Not sure where you downloaded the Mojave dmg, but it may only be the updater for an existing installation.
Delete that installer and follow the guidance below.
❗️ Do NOT upgrade until you have made a Time Machine or other backup of your startup drive.
Learn How to Back up your Mac with Time Machine
How to Upgrade macOS:
The macOS version you can upgrade to depends on the year your Mac was released.
Click the (Apple) menu at the top of your screen and choose About This Mac.
Check the Compatibility of your Mac with newer versions of macOS:
➡️ macOS 10.14 Mojave is compatible with the Macs listed here
✅ - IF your Mac and apps are compatible, then using Safari only, download the macOS upgrade installer app:
Click > Mojave,
Once downloaded, double-click the “Install macOS…” app in the Applications folder to begin the upgrade.
Please see > How to download macOS.