Draft a new cover letter for each company. It is easier to create a template and change the name of the company every time you apply, but it is not useful. When a hiring manager reads your cover letter, they should know why you want the job and what you can give to their company. They know about your education and work experience from the resume. Tell them about your soft skills and hard skills. If you have worked on a project that has exceeded expectations, write about that. If you have done any volunteering work, mention that. State how your experience in the past has shaped you as the ideal candidate for their company.
Your resume is meant to lay out the facts, but your cover letter is meant to convey more personality. The cover letter is your first introduction to the person who may hire you, and your goal should be to make you as memorable as possible, in a good way.
That means writing a unique cover letter for each job you apply for. No templates. No pre-written nonsense. The format of your cover letter should also match the company and industry you are applying to.
There is no "official format" for your cover letter or the information you include in it, but your cover letter must be visually organized and orderly in its presentation of information.