Thanks for writing to health care magic.
No eating a egg does not cause typhoid fever
unless it is contaminated by a bacteria called salmonella typhi
Poor hygiene and public health conditions are responsible for its transmission.
Improper hand washing (particularly by food handlers) is responsible for transmission.
Hope I answered the query.