I would call the dealer and ask him / her not to destroy the engine, you can also read the catalog that you get with the car that appears there, you also have the option of reading the instruction manual (that great unknown) that bmw puts it in the idrive and you do not even need to get out of the car to see it.
And out of pranks and ironies, obviously it is better to throw from the 98 than the 95. If it were the other way around I would at least tell you that if you looked at it in the manuals.
On the other hand, it would not affect the durability of the engine practically, nowadays the cars come with octane sensors which are recalibrated in real time.
If you use 95 now, you will not hurt NADA by putting 98, it's a better and more expensive gasoline, so the worst thing that could happen is that you will not take advantage of that price increase, although in modern cars it is very possible that it will be used, in the majority, an adjustment to the octane used is produced.
The manual will tell you what the manufacturer recommends, in mine it says that 98 is recommended, that it can work perfectly with 95, with slightly less power, and that it also works with 91, although it is not recommended to throw it out.
In one of the cars I do not notice difference and I miss 95, in the other I notice it and I put 98.