With the area you want to export selected, you go to File > Export > Media and it will only export the part selected. You can change which part will be exported thanks to the yellow bar you have in the bottom-left area of the export window. By default, the area is the same of the work area bar in your timeline, that’s why it will only export the part selected.