Did Trunks SSJ2 become much stronger after the sparring with SSJ3 Goku?
Trunks in his SSJ2 state was definitely stronger than Goku and Vegeta SSJ2 in the Buu saga. However, weaker than SSJ2 Goku and Vegeta in super. I would say, his SSJ2 transformation is more or less relative to that of Caulifla's towards the end when she began to master it during her fight with Goku.Trunks attained another transformation called Super Saiyan Rage during the course of battle with Goku Black. This transformation made him strong enough to at least hold his own against SSJR Black and made his power slightly relative to Blue. He easily surpassed SSJ3 Goku at this point. His power would be relative to current Mystic Gohan and Android 17 who are stronger than SSJG and more or less relative to SSJB tier(Not stronger).As for trunks getting stronger,  No, his fight with Goku or Vegeta didn't give him any Zenkai boosts. A saiyan attains a Zenkai boost when he is in a situation where his life is at stake. Goku merely took him out with one shot and Vegeta obviously didn't try to kill his son! The fight against Goku was Super trying to show where Trunks's power stacks up to the Z fighters now, as he hasn't come on for a very long time. His fight against Vegeta, was very likely a throwback to their training in Z and to create a father-son moment between a newly changed Vegeta(In terms of character) and Future Trunks.We know the SSJ transformation is generally caused by rage. We've also seen powerups in SSJ transformations by characters when they are angry or someone's life is at stake. Example: Vegeta in his SSJ2 form against Beerus, Goku in his SSJB form against Black and Zamasu, Vegeta in his SSJB form against G.O.D Toppo. Trunks similarly, attained a very powerful rage transformation in this manner.