ToExistingStacks
A client-side Minecraft mod that implements the "Add to Existing Stacks" button from Stardew Valley for inventory management.
Basically, it will move any stack of items of type X from your inventory to a container that you have opened, as long as that container already has a stack of item X in it, whenever the mod's keybind is pressed. This also works on most screens with item slots, like furnaces and crafting menus.
To run ToExistingStacks, you will need Minecraft 1.18-1.19, Fabric Loader, and the Fabric API.
Note: This mod is client-side only, meaning you can connect to servers while using it. However, this mod acts a lot like a macro (to the server, it looks like you're shift-clicking a bunch of times really quickly), and may get you banned if used on certain servers. Please be careful using this mod in multiplayer. Only use it on servers you can be certain will be okay with it.