There's a few kinds of "white smelly goop", but two of them are really common inside ebike stuff.
If it is rubbery and not smearable, a "glue" that holds parts down, that's just RTV silicone. Use the kind that does *not* have acetic acid (vinegary smell) if you're putting it on stuff where it may contact metals, wires, electronics' contacts/pads/etc., or it may over time cause corrosion. I use GE Silicone II from Lowes in the big caulking gun tube. I usually use the clear version instead of white, just so I can see what's under it later if I have to do a repair. ***
If it is kind of sticky and smearable (or sticky and powdery), then that's thermal paste, or heatsink compound, etc. Titanium dioxide in a carrier (which usually dries out and if there's too much paste between the objects being connected by it, will now have an air gap and it is worse than if they had never put any at all

"too much paste" being any more than is needed to *just fill* the tiny scratches and surface imperfections on the faces being connected--if you can see the paste smeared around on it, there's too much). There are a bajillion different kinds in all sorts of price ranges, and generally the cheapest gunk works *almost* as well as the most expensive, as long as they are both applied correctly.
A less common kind is inside some gearboxes, throttles, geared hubmotors, etc., and feels slimy and sometimes sticky. THat's white lithium grease, usually.
*** I also use GE Silicone I for sealing up other things than metals, especialy things I have to be exposed to, becuase it has acetic acid instead of the long chemical-name solvents, and it cures without a remaining toxic smell to me...but it's not suitable for things with exposed corrodable metals, in my experience.
