Change of Affiliation before Publication
You can have multiple affiliations on a paper. When transitioning from one institute to another while working on a paper, it is common to list both institutes as affiliation. You should list all those places where a significant amount of work has been done. That is, if you run a study at institute A and write the paper while working at B, list both A and B.

If you are currently without any affiliation only mention your former place.