why does my sonata have a ticking noise
If the ticking noise is coming from the engine, get your bearings fixed asap before your engine locks up. That can be caused by running with low oil level, not getting oil changed, running incorrect oil type, or faulty oil pump.
If the ticking is coming from inside the engine, it could be a sticking valve due to a clogged/defective lifter or a broken spring, or it could be a dry rod bearing. If it's coming from outside the engine, it's likely a bad pulley on the serpentine belt. If the ticking is coming from inside the car, it's likely the clock.