I feel like this might/should exist, but I can’t find it. Is there a program that allows for replacement screw cap generation by simply entering a diameter, depth, thread gap, and thread pitch? Would be really nice to have something like that. I the meantime, maybe I’ll consider printing tpu corks/ stoppers with mid diameter equal to vessel opening diameter.
The term you are looking for is “parametric”. You might be able to find a design you need through the many 3D printing file sites using that term. FreeCAD and Fusion360 are open used but another is OpenSCAD if you are more programming savvy than modeling savvy. There are plenty of recipes for threads in there to make your relatively simple design request here.
Tons of good and free options, you just gotta pick which one looks easiest for you.