1) I come across this doubt a lot. The first thing which was created was a pen and everything was written for all. Now no matter what I do, things going to happen as He has written for me and no matter how hard I try, my destination is hell or heaven no matter what I do here in this world?

2) Do duas matter? And can it change anything already written? Or it doesn’t matter

3) How can we change what’s already has been written?

1) Everything written for us means Allah has designed the system and nothing can change His system. Allah manages everything. Now Allah has also written for you to have free will. This is part of what he has written for us. So anything we do it’s “written” by God because He let us do it, and He knows of it. But it doesn’t mean that He forces us to do it.

2) Yes Du’as matter and they can change that which is written

Yes, asking Allah for those things makes a big difference. Allah Has written things for us, but He has also given us the chance to change that (not change all of it, but many aspects of it). We have many hadiths about this.

Supplicate sincerely, pay charity, keep ties with your kins, Allah can change it