If the glass door is broken but the inner screen of the microwave door is still intact then it is safe to use the microwave.
But if the inner screen of the microwave door glass is missing then you should not use the microwave because the microwaves and radiation can escape from the microwave and be harmful to your health including causing cancer.
Also if the door is not closing properly on the microwave that is not safe either and the microwave should not be used and it's best to get a new microwave.