Worldbuilding is the act of creating your story setting. Every fiction author does this to some extent, regardless of genre.
Some authors only need to create fictional towns set in our already-existing world, whether past or present. You see this a lot in historical romance, sweet contemporary romance, and cozy mysteries.
Fantasy and science fiction authors do the most extensive form of worldbuilding that exists. These authors often create entire worlds or universes, including all the little ‘extras’ that you may not realize–countries, cultures, fashion, art, systems of government, and religions. Just to name a few.
And of course, if one is writing fantasy, one must also create a magic system.