Most analog cameras with a fixed lens have a fixed focal length. So if you want your subject to fill the frame, you have to get closer to the subject. Or you can use a camera with interchangeable lenses for which there are lenses with a flexible focal length.
Especially in the 90s and early 2000s, many compact cameras for the hobby photographer were sold with a built-in zoom lens. However, the flexibility in focal length is paid for with smaller maximum apertures. As a rule, the larger the zoom range, the larger the lens needs to be for a large aperture. For this reason, you will probably never find a compact camera with 24-100 mm optics with f/2.8 throughout for 35mm film.
An overview of various analog cameras with zoom lens.