The correct option is B knock
Option B is correct. The phrase 'heard a knock' means to hear the sound of somebody knocking at the door or gate. The other options are incorrect because 'hit', 'lean', 'strike', 'touch' do not justify the phrase of tapping or knocking at the door.