Must Hafrashat challah be done only on Thursday?
And must it be done after sunset?
No, hafrashat challah, removing “challah” from dough for baked goods, may be done at all times during the week, night and day.
The Rama in O:C 242 brings that there is a custom to bake challot on Erev Shabbos. The commentaries explain that this is in order to busy one’s self with Shabbos preparation which is itself a great mitzvah, An additional reason is to perform the mitzvah of removing challah. So while there is reason to bake specifically on Erev Shabbos, one who bakes during the week with intent to save for Shabbos, also fulfills the mitzvah of honoring Shabbos, see Beitzah 16a. See Shu”t Avnei Yashfa O:C 5:45.