This mods adds a keybind (default U) to dupe the item in hand, the mod only works if it's installed in both client and server so don't try to use it in servers it won't work as it doesn't exploit the game.
The mod is made for 1.21.1 neoforge although it can be ported easily

