There are many sites on the internet that will provide you with advice on how to write a good SOP. However, I have read and edited dozens of SOPs and I would like to give some basic guidelines that you may not find elsewhere.
First, and perhaps most importantly, make it easy to read. Why and what do I mean by that? Your SOP is going to be read by members of an Admissions Committee who are responsible for choosing a few applicants for admission to the university from, potentially, the hundreds who have applied. An easy to read SOP will be appreciated by the Committee while a difficult to read SOP will quickly be discarded. I suggest 12 point Times New Roman with a line spacing of 1.5 as comfortable and easy on the eyes. Your writing must "flow" logically from sentence to sentence and paragraph to paragraph. Keep it simple and avoid complex or "flowery" vocabulary which may not mean to the reader exactly what you are trying to convey. Avoid long sentences. Long sentences are difficult to read and difficult to understand. Be clear, specific and easy to understand.
Unless the university requires something different, I suggest 700-800 words as a good length. Fewer words may not allow you to say enough about yourself. Anything much longer becomes boring for the Committee members to read. Under no circumstances should you go over 1000 words.
Your SOP should be personal. Sure, you had a great GPA. So did everyone else applying for admission to the university. The Admissions Committee wants to know about you as a person. In recent years an increasing number of top universities are paying less attention to applicants' academic credentials and more attention to what makes them a "well-rounded person". What did you do other than your academic work? Did you have a job, participate in extra-curricular activities, play sports or do volunteer work of any sort or did you just go home and play video games?
Why this school? Tailor the SOP to the school you are sending it to. Say something about the school, the facilities and the faculty so that the Committee knows that this is not simply a "form" letter that you are sending them.
Be enthusiastic about the school and confident of yourself, but not overly confident. You are not the greatest person to ever apply for admission to this university.
Have your SOP proofread and edited. A SOP containing spelling or grammar errors will not impress the Admissions Committee.