Go through these in order and stop at the first one that applies. If you are reading this for someone else, answer for them.
Call emergency services or go to an emergency department if swelling makes it difficult to breathe or swallow, spreads toward the eye or neck, or causes drooling or a change in voice.
Seek emergency help for jaw pain accompanied by chest pressure, shortness of breath, sweating, nausea, or pain spreading into an arm or shoulder.
Seek urgent dental care immediately, handle it by the crown rather than the root, and do not scrub it.
Seek same-day dental or medical care if tooth pain occurs with:
Arrange a dental appointment if pain lasts longer than a day or two, keeps returning, or interferes with sleep or eating.
You should also book an appointment for pain when biting, a cracked tooth, swollen gums, drainage, or a lost filling or crown.
The article also says
Jaw or tooth-like pain can rarely occur with a heart problem.
A knocked-out permanent tooth is also time-sensitive.
Every sign above is quoted from the sofidex article on Toothaches. If you are not sure, err upward — it is always reasonable to be checked.