Answering the n question, Dr. Main K. Al-Qudah, a member of the Assembly of Muslim Jurists in America (AMJA) stated,
The Divine destiny is an unseen for us; we do not recognize it until it happens.
additionally, it is not always associated with Allah’s contentment, nor is it associated with His enforcement.
In another words, and based on the examples you mentioned, we know the time of death of the heavy smoker only when he dies. We believe he will be held accountable because of what he did, because Allah did not enforce him to smoke! Allah (exalted be He) has known in advance that he will smoke heavily and this will cause him to die in this particular date. So, He has written that His so and so servant will die in such and such time because of cancer resulted by heavy smoking.
as you see, the above has nothing to do with Allah’s contentment because Allah (glory be to Him) does not want us to harm ourselves. It has nothing to do with enforcement, because we were not imposed to do what we did.
May Allah guide all of us to what pleases Him!