On Gear (D) I can't go more than 40MPH speed,
It just doesn't change gear after that,when I accelerate my acceleration metric goes up to 7 but speed is the same speed, it looks as I changed it to gear (N) , It just doesn't shift up from speed 40MPH, but when I put in gear (3) it goes up to 60 MPH but the acceleration goes so high until (4,5,6,7) and the engine makes so much sound.
I'll be really glad if you help me.
My car has an automatic transmission.
This is likely a transmission problem dealing with the proper shift points. There is an ECU module in the transmission that regulates when the transmission shifts from one gear to the next based upon engine RPMs and activated by a solenoid. When this solenoid is faulty, this can cause the symptoms you have described. I would recommend having an expert from YourMechanic come to your home to diagnose and repair.