With anim.Play, you don’t have any transition time. You can get that from anim.CrossFade, though.
The big difference is that the trigger plays into the animator controller’s systems. So if you’re playing a state that doesn’t have a transition out that uses the “Attack” trigger, nothing will happen right away in the first case. You’ll still have set the trigger, though, so when you get to a state that uses the “Attack” trigger, that transition will happen.