How to connect MPU 6050 and HMC 5883L to i2c bus?

I'm trying to connect the MPU 6050 module and HMC 5883L module for my IMU of the Autonomous Car. But there is one i2c connection in Nano (A4, A5). When I run the code for MPU 6050, it shows the results. the code is here.

#include <MPU6050_tockn.h>
#include <Wire.h>

MPU6050 mpu6050(Wire);

void setup() {
 Serial.begin(9600);
 Wire.begin();
 mpu6050.begin();
 mpu6050.calcGyroOffsets(true);
}

void loop() {
mpu6050.update();
Serial.print("angleX : ");
Serial.print(mpu6050.getAngleX());
Serial.print("\tangleY : ");
Serial.print(mpu6050.getAngleY());
Serial.print("\tangleZ : ");
Serial.println(mpu6050.getAngleZ());
}

But when I run the Magnetometer Code, it doesn't give the data.

#include <Wire.h>
#include <DFRobot_QMC5883.h>

DFRobot_QMC5883 compass;

void setup()
{
Serial.begin(115200);
while (!compass.begin())
{
Serial.println("Could not find a valid QMC5883 sensor, check wiring!");
  delay(500);
}

if(compass.isHMC()){
    Serial.println("Initialize HMC5883");
    compass.setRange(HMC5883L_RANGE_1_3GA);
    compass.setMeasurementMode(HMC5883L_CONTINOUS);
    compass.setDataRate(HMC5883L_DATARATE_15HZ);
    compass.setSamples(HMC5883L_SAMPLES_8);
}
  else if(compass.isQMC()){
    Serial.println("Initialize QMC5883");
    compass.setRange(QMC5883_RANGE_2GA);
    compass.setMeasurementMode(QMC5883_CONTINOUS); 
    compass.setDataRate(QMC5883_DATARATE_50HZ);
    compass.setSamples(QMC5883_SAMPLES_8);
   }
  }
void loop()
{
 Vector norm = compass.readNormalize();

 float heading = atan2(norm.YAxis, norm.XAxis);
 float declinationAngle = (4.0 + (26.0 / 60.0)) / (180 / PI);
 heading += declinationAngle;

 if (heading < 0){
 heading += 2 * PI;
 }

 if (heading > 2 * PI){
 heading -= 2 * PI;
 }

 // Convert to degrees
 float headingDegrees = heading * 180/M_PI; 

 // Output
 Serial.print(" Heading = ");
 Serial.print(heading);
 Serial.print(" Degress = ");
 Serial.print(headingDegrees);
 Serial.println();

 delay(100);
 }

Circuit diagram


I have already scan i2c. but only one device is shown.

Connect them in parallel. I2C is a bus, intended for several devices in parallel. The schematic does not show power and ground connections.

Logic level shifters are required to connect a 5V Arduino to 3.3V sensors.