When would you write an abstract?

When I searched “write abstract before or after paper” on Google, the first result was “Write your paper first, save abstract for last”, and the second result was “Writing an abstract months before the paper”. I used to write abstract after finishing the paper; however, after writing a few abstracts for conference and paper proposals, …