I read that garlic pressed hard by the back of a knife releases oils, but then some recipes just say to chop. Are there any preferred ways or does it depend on the dish being cooked?
In my experience, which is by no means gourmet, there are reasons for both. Sometimes the need gor the garlic is to add a flavor without being explicitly consumed - not quite a tadka, but cooking in oil to release flavors. In those cases presentation comes into play too - sliced fried garlic as garnish, versus crushed and chopped/minced garlic as a cooked-in component.
Many times, I personally cannot be arsed to do garnishes for a dish I am making for flavor cravings, so I fire the garlic in minced. There's, like, a very few Chinese dishes I've had that use the garlic in the cooking but not intended for consumption so in it goes, regardless of whether or not it's supposed to be included.