The earth rotates around its own axis, which causes the phenomenon of day and night.
The earth rotates from west to east.
This is why we get to see the sun first in the east direction.
As the earth rotates, the sun appears to move towards the west.
Gradually we see that the sun sets in the west and the night sky appears.
Even though from the surface of the earth, it seems as if the sun is rising and setting, in reality, the position of the sun is fixed with respect to the earth, and it's our earth that rotates.
Hence, the sun rises from the east and sets in the west.