I am Indian returning from Europe - Poland back to India. I have a Schengen visa.
I have Wizz Air Flight from Poland - Budapest - Dammam. I have Indigo Flight from Dammam - India.
Do I need a Transit Visa? If so, is it possible to get it online?
Since this is a self-transfer, the first airline is extremely likely to consider that Dammam is your final destination, and request that you have the appropriate documentation to enter Saudi Arabia, not transit (they don’t care if you have another flight, and don’t have any way to check that you really do, and don’t want to be held responsible if your second flight is delayed or cancelled or you need to go through passport control to get to check-in or whatnot).
However, you are in luck: as you have a Schengen visa, you are eligible for visa on arrival, so the airline will be happy with just your passport and Schengen visa.
Note however that is must be a “business or tourist” visa and you must have an entry stamp into Schengen in your passport.
Saudi Arabian transit visa can be requested here
According to information on that site, a transit visa is not required for stays shorter than 12 hours. I recommend contacting the embassy and verifying that it also applies to self-connections.