To do this, open your Gmail account and click the settings icon (gear symbol) in the top right corner. Then, go to See all settings > Filters and Blocked Addresses > Create a new filter.