Write it last.
I'm in CSE too. I always start my papers at Section 3: Methodology. Then I write subsequent sections, only interrupting to fill out bits of Section 2: Related Work whenever it becomes apparent that I need extra contextualization. I carry on until the Experimental Results section is complete.
At that stage, if time permits, I like to let the paper lie for a few days, and get busy with other tasks. On the backburner of my brain, ideas will form on how to frame the paper. That framing is represented in the paper by the trio of Abstract, Introduction, and Conclusions. Of these, I've found that it works best for me to write the Conclusions first (iterating over the main message of the paper, and how that message is evidenced by concrete results from Tables and Figures), and then write the Introduction such that it matches the Conclusion. Finish it off with the Abstract.
This is my process, and you mileage may vary, of course. But I've learned that if you write the Introduction of the paper first, it takes forever and the result will not be very good. You most likely need to change the Introduction anyway once you have written your Conclusions. So keep it for last.