You’re still uploading your old project for the Mega, not the project for your ATmega328P. Select the active project correctly, per documentation and this.
You’re still uploading your old project for the Mega, not the project for your ATmega328P. Select the active project correctly, per documentation and this.