The Truffle Worm is a passive monster that can be found in underground Glowing Mushroom biomes when Hard Mode has been enabled. Like other critters, they can be caught with a Bug Net, yielding a Truffle Worm (Material).
When approached, the Truffle Worm will flee within a couple of seconds, digging away from the player at great speed. It is advised to approach them very rapidly while already swinging the Bug Net to have the best chance of catching them. For some reason, most Truffle Worms on mobile don't flee when approached.