Know on which side one’s bread is buttered
Know where one’s advantage lays, an old proverb that first appears in John Heywood Proverbs (1546).