There are four key elements to any cover letter, and they are often missing or misunderstood.
First, the appeal of the company. The question you are trying to answer is why do I want to work for this company?. You might not have a reason when you see the job ad, but you better find one soon. This require some research online. Look for stories that might resonate with who you are and what you stand for, or even for characteristics the company has that meet some of your outstanding experience. “I have heard a lot about company X”, or “I have always wanted to work for company Y” does not really cut it anymore. Basically anybody can claim the same, and you should start singalling uniquess from the very beginning.
Second, the passion for the role. The question you are trying to answer is what makes this position important for me?. Here is where you start telling about your passion for the field, about the times you have worked in the same role elsewhere and have excelled, about how you have tailored your curriculum to exactly arrive at this moment, applying for this position. Even if you are a new graduate, you probably have some passions or preferences for one field or another, and expessing them is always better than “I am just ok with any job you could offer me”.
Third, your experience. This is what most people get wrong. It’s not about making a list of places you have worked, roles you have covered, skills you have accumulated. There’s a CV for that. The question you are answering here is what have I done so far that matches the requirements listed in the job ad?. Many applicants preach to the wind, figuring that their experience would be good enough for most jobs. But actually, you want to look at the list of requirements carefully, think at what you have done so far (professionally, academically, personally, in order of importance), and see what you have learned that might be applicable in the role you are applying for. It will take a while, and you really have a chance to stand out in this section. It helps if you look at your career horizontally rather than vetically. Pick two, maximum three, relevant examples, and use a story format: “We had this problem at company X, we tried this and that, we eventually achieved a x% improvement in A, and this tought be the importance of B” (where B is what the target company is looking for).
Fourth, and last, the deabreakers. In this final section, you want to list things that are a must for you. “What could the company fail to provide that would make me change my mind about all of the above?”. Here is where you list availability to travel or relocate, salary requests, need to work remotely, and so on. If you have more than two or three items, carefully think if they are all _so_ important that you really want to point them out in the cover letter. Eventually, you do this to avoid a waste of time, but you also want to signal some sort of flexibility to further underscore that this role at this company is truly what you want.