If you wanted to keep going down the path you've started, I think you're on the right track. Something like this might work for one part:
Rule 1:
Trigger: Door opens
Actions:
Cancel Delayed Actions
Set Global Variable recentDoorOpen to true
Delay 24:00:00 (cancelable)
Set Global Variable recentDoorOpen to false
Then, you could have another rule like:
Rule 2:
Trigger: recentDoorOpen becomes false
Actions:
Notify "Door not opened for 24 hours!"
However, if you don't care to also use the door status in other rules (or display it somewhere like on Dashboard), then you probably don't need the global variable and could use a different technique to just do it all in one rule:
Single-rule alternative:
Trigger: Door opened
Actions:
Cancel Delayed Actions
Delay 24:00:00 (cancelable)
Notify "Door not opened in 24 hours!"
Note that I'm taking your request pretty literally and only looking for "open" events. If you want a change of status, open or closed, the above rule could be rewritten to use a "changed" trigger instead of just "opened." However, since most doors would have both events in quick succession, I don't see a reason to prefer anything other than exactly what you said here.
Alternatively, you could use a "Wait" instead of a delay. Unlike delays, waits are cancelled any time a trigger event matches. You can put a timeout on the wait, and then test to see whether the rule actions moved on because the event happened or just because time has elapsed:
Single-rule alternative with "Wait":
Trigger: Door closed
Wait for events: door opened --> timeout 24:00:00
IF (Door closed) Notify "Door not opened in 24 hours!"
That being said, if you aren't trying to learn Rule Machine, the built-in Notifications app should be able to handle this, too. Just choose a contact sensor, choose to get notified when it remains opened, and use 1440 for the "for how long (minutes)?" value (24*60=1440).