Just regarding transit, since it is a different PNR, you have to call the checking gate and pray that they will send someone to open the connections door, they really do not like, in Sep 2018, according to this, 142 did a connection in TLV!
More into here:
Timatic (the database used by airlines to determine eligibility and required documentation -- note that I randomly picked UK citizenship, you may want to "change search" to get results for your actual citizenship) currently states:
Admission and Transit Restrictions:
Passengers are not allowed to enter and transit.
Information: This does not apply ...
Terminal 4 at Madrid airport consists of 2 buildings - the main 'T4' building which contains all of the check-in counters, baggage claim, etc, and a "Satellite" terminal, 'T4S'. These two buildings are connected via a automated train that takes about 4 minutes to go between buildings.
Your itinerary will always list "T4" regardless of ...