If you’re having trouble doing this legitimately:
-Go to game settings
**Change user customisation sliders**
-Shot error user to 0
-Shot speed user to 100
**Change CPU customisation sliders**
-Goalkeeper ability CPU to 0.
Start a kick off match with any decent team (I used Bristol City wink wink), get the ball to a defender and shoot a half decent shot from mid-way into the opponents half. I managed to score a hat trick with a defender in no time at all with this method.
As mentioned by @jrod39 the goal does need to be scored with a defender, not a midfielder or striker playing as a defender. For example, it won’t pop if you say, put Griezmann in defence and score with him.