There is a single technical term to describe music in a movie which is not part of a separate soundtrack, but which is generated by actions in the film. For example, a radio is turned on or a recording is played. "something"-genic music perhaps? I've forgotten it, and I would love to recover it.
Source Music, a form of Diegesis
Diegetic music or Source Music is music in a drama (e.g., film or video game) that is part of the fictional setting and so, presumably, is heard by the characters.
1 The term refers to diegesis, a style of storytelling.
In films, it is often heard as part of a dance sequence, or possibly from a car radio on-the-road setting, or home sound system when the characters choose music to set an ambience or illustrate their own personal style. Recently it appears in the form of the "lone runner in the street listening to earbud " music as a popular meme or trope, when the the director or writer are struggling to find a good way to introduce another action figure.
Source Music means musical works (and accompanying literary works) and sound recordings not specifically composed or created for use in the Film and incorporated into the soundtrack of the Film;
People working in the industry, however, usually used Source Music when I was doing that kind of thing. Diegesis is one of those words that academics use.
Also see: Dictionary.university
"Occasional music" is the standard term I've seen used academically for such music, even though it primarily refers to music composed for the purpose of the film.
The abbreviation "OST" for "original soundtrack" can include both true "occasional music" and bonus music inspired by the movies that isn't played at all until the credits, and other music that does not accompany the action (e.g. music in the opening and closing sequences of an anime).
The term I've always used is incidental music.
Incidental music is music in a play, television program, radio program, video game, film, or some other presentation form that is not primarily musical. The term is less frequently applied to film music, with such music being referred to instead as the "film score" or "soundtrack".
Incidental music is often "background" music, and is intended to add atmosphere to the action