Sleep schedule

Hi.

My daughter is 3.5 months old. She has been showing signs of teething since she was 5 weeks old. Recently, she has been sleeping less and less at night and waking up before the sun.

I unfortunately do not have a proper sleep schedule for her.

She could sleep 3-4 times during the day from anywhere between 30minutes to 2 hours, and wakes up hungry.

I usually do bath time around 7pm and she is sleeping by 7:45ish for a good four hours.

She is underweight and needs to eat at night.

Am I doing something wrong?

How do you get babies on a sleep pattern and not put them to sleep when they are yawning or crying for sleep.