Shorts glossaryContent ID
Content ID is YouTube's system that matches uploads against registered recordings and raises a claim on a match. On Shorts longer than one minute, an active claim blocks the video worldwide until it is resolved.
In practice
Rights holders register their recordings, and Content ID compares every upload against them. A match can raise a claim automatically, even on a short stretch of a song. A claim acts on that one video and usually leaves the channel alone.
A copyright strike is a different thing. It follows a valid legal removal request, and strikes are what put a channel at risk. People mix the two up, but a claim is a mark on one video while a strike counts against the channel.
Shorts add one sharp rule. Since Shorts can run up to three minutes, YouTube says a Short longer than one minute with an active Content ID claim is blocked worldwide. Once the claim is resolved the Short can be watched and monetized again, but while it stands nobody can see it.
There is no safe number of seconds of a song. The safest sources are YouTube's in app sound picker, the YouTube Audio Library, or a track you hold a licence for, and narration with no music at all.
An example
FacelessWave's music library has 38 tracks, 31 under CC0 and 7 in the public domain, and tracks that need a credit line are left out. Every video can also run on narration alone.