Kneading Bread After Rising
The purpose of kneading is to develop gluten in the dough. Gluten is made of long strands of protein — it makes the dough stretchy, so it can contain the bubbles created by the yeast or sourdough culture, enabling the dough to rise. Therefore, you need to knead before rising.

If you knead the dough again after its first rise, you'll destroy many of the bubbles and your dough will become flat and dense. Most recipes call for a "forming" step after the first rise — this should be done gently, so as to keep as many of those bubbles in the dough as possible. This will keep your bread light, with a nice open crumb.