Interesting question and because it is so broad this might not help you loads, also this is my opinion so here is the OPINION DISCLAIMER.
Sci-fi is like any other genre, the foundation of the story has to be good for the actual story to work out. So to write good sci-fi you need a good plot, interesting characters, some form of world-building and you need to have story progression.
Without these it wont matter how good the sci-fi element is, because it is characters (IMO) that make or break a story- they need to be compelling.
For specific Sci-Fi advice:
But with any genre, experiment. Have fun. It doesn’t need to be perfect the first time around.