One of the main ways Shakespeare creates drama and tension in Romeo and Juliet is through the use of foreshadowing. At the very top of the play, Shakespeare gives away the entire plot of the play in the prologue. The audience, or the reader, is aware there is a great conflict between the Montagues and the Capulets, and that Romeo and Juliet will consequently die by the end of the play. Why would Shakespeare do this? It all has to do with foreshadowing and how this foreshadowing creates dramatic tension.
Sarah Moore writes about foreshadowing, as well as Romeo and Juliet, in an article titled, "How the Techniques of Flashback and Foreshadowing Can Have a Dramatic Effect on a Piece of Writing":
A famous example of foreshadowing comes from Shakespeare's "Romeo and Juliet," where Romeo tells his love "Life were better ended by their hate / Than death prorogued, wanting of thy love." By this he means that he'd rather live a shorter time and have had her love than live a full life without it. As he finds both her love and an untimely end, the line foreshadows his fate.
There are numerous examples of foreshadowing throughout the play, but the most obvious is the prologue. The second attached link is to an eNotes answer that details many examples of foreshadowing in Romeo and Juliet.
Ultimately, foreshadowing creates tension by giving the audience information that the characters don't yet know or understand. Similarly to a thriller, the audience knows something will happen but do not know how it happens. This question of how is what creates tension and drama.