Since you’re using an induction cooktop, it can typically extend into adjacent cabinets because it’s very shallow and usually only requires a cut into the countertop, not the cabinet tops. While some models may have electrical components in the middle, this depends on the design and is fairly common. In this case, you would simply build your base cabinet around the 24″ wide wall oven, leaving 16″ of extra space from the original 42″ gap. You can fill this space with any base cabinet configuration that maximizes storage and versatility.
See the attached images. i included an example of how we would build a simple base cabinet to hold a 24″ wide oven. This is not standard and the sizes will certainly change based on changes to the model you plan to use.