ok I am going to explain it like a 5 years old. Because you sound lost, and the people answering you are really aggressive in their answers. It's always better to trust in God. It's easier. You can never go wrong with that trust. It will never betray you.
Simple answer
Here its how it works. Destiny is already written, but not in the way you think. Think about a branch on a tree and how it diverges into multiple parts. That's how destiny is written, God knows every possible option for you. Meaning you can only pray for a better path but without asking for it, nothing ever changes, thats where DUA and prayer comes in.
Destiny has been written before you were born, but not in a linear manner. It goes into the infinite multiverse. Meaning GOD, has already written your death and your net worth in life for every variance in your multiple universes. He knows every single choice you are going to make. There is nothing that can surprise him. Although GOD can change your future paths, remember your life has many ways to branch out. In your future path you can be a drug addict, in another future path a gangster. Sometimes nothing ever changes, you are born poor and you die poor. You always prayed for a better life, but you were never given one. Except in your hereafter, your rewards are there and ever lasting.
You are bestowed the will to ask, nothing else. Its like a game simulation, everything is set at stone, Your body, your struggles and your relationships. It doesn't mean your path can be tweaked. In every game you have 4 options for an ending, except in the real life. Your choices are endless in the real life, and Allah knows every single one of them. Its predestined.