Inflation is the rate at which the general level of prices for goods and services rises over time, leading to a decline in the purchasing power of money. Inflation occurs when overall demand outpaces supply - whether that’s because people are buying more than the economy can produce or because shortages make it harder for the economy to keep up.
You're mixing up relative price changes with inflation.
When the price of oil or another commodity rises or falls due to supply and demand, that’s a market adjustment — a microeconomic change. Inflation, on the other hand, is a broad and sustained increase in the overall price level across most goods and services in the economy - a macroeconomic trend.
Supply shocks (like oil spikes) can cause inflation if they ripple through the whole economy and raise costs generally, but by themselves, they’re not inflation.
So yes, oil prices rising and falling isn’t inflation by itself, but widespread increases in prices (generated from covid or tariffs) is inflation.