They are all grammatically correct, but it’s a question on what you want to emphasize.
For example if I asked “Who did you touch?”, “I gave Tom a nudge” is better cause the question was about who.
But if I asked “What did you do to Tom?” then “I gave a nudge to Tom” is better cause the question was focused on what you did.