Looking at the trading part of this video even at only 1/4 the regular speed, it jumps around as if it is leaving parts out. So just from looking at it I can't tell what is happening.
I only know of the "regular" way to trade: clicking on the villager trade I want automatically populates the trade window with up to 64 of the things I want to trade, then I keep left-clicking on the gem while holding down the shift key until I have made as many trades as possible with the 64 items. Then I have to click on the villager trade again to re-populate the trade window with up to 64 more trade items.
I'm curious to see if someone can give instructions on how to do this faster or differently.
I just watched a speed run by Dream and while he was crafting sticks and trading them so fast I couldn’t keep up he said people had asked him in comments how he does it and he said use Shift and Enter. It is at 15.22.