Where should heat comes from when baking brownies? I’ve tried baking brownies  many times and they are always burnt on the top (darkened to black instead of being brown). My question is where should I set the heat to comes from, from bottom, top, both and with fan or no fan.

Edit: I am using a electric oven and baking at 180 C
Fan ovens are generally regarded as 10% hotter than regular ovens, so I would suggest fan only, dropping the oven thermostat setting down by that amount than your recipe dictates. Fan mode will give you a more even, consistent temperature throughout the whole oven, whereas the different elements (and non-fan mode) will bring different results.

Using the top and bottom elements will concentrate the heat at the top and bottom of the oven respectively, and will also affect the texture of the top and bottom of whatever you are cooking. Non-fan may lead to hot-spots or the heat concentrating around the elements.

I find turning all the elements on at first to quickly preheat the oven, then switching to fan gives good results, but I have a very large 90cm single oven.

https://hummingbirdbakery.com/blogs/hummingbird-bakery-blog/oven-temperatures-and-baking-explained