I mean when, let’s say, I have one day, a week or a month left to live suffering from an illness
The likelihood you'll have any clue your going to die in such a short time as a month is extremely low. You're much more likely going to die in an instant through fatal injury or bodily failure like a heart attack or brain aneurysm. Lets say you live to 85 years old and are finally dying of something entirely predictable for old age like congestive heart failure or late discovered end-stage cancer. You're going to be long past having any energy or ability to do anything about without help.
If you actually get some kind of clear guidance you're going to die from a prolonged (meaning not instant) ordeal, you'll likely be in hospice where they will give you amazing narcotic drugs in whatever massive doses you need so you feel no pain and are simply swimming in dopamine as your body gives out.
The takeaway is, there's no point trying to spend your healthy hours trying to plan for something like this. No plan you can think of will be useful even in the extremely unlikely scenario, the conditions you imagine do happen.