The speaker of the first sentence is suggesting to someone that they do not do something - at the moment or in the future.
The speaker of the second is speaking about a past situation. The person addressed did do something. The speaker thinks that that was not a good idea.
Student or Learner