When you select the second subplot, you need to use the plot command again to plot the audio signal.
Here's a modified version of the code.
load handel.mat
filename = 'handel.wav';
audiowrite(filename,y,Fs);
clear y Fs
[y,Fs] = audioread('handel.wav');
N = length(y);
t = (0:N-1)/Fs;
delay2 = 3*Fs;
Z = zeros(delay2,1);
subplot(2,1,1);
plot(t,y);
xlabel 'Time'
ylabel 'Audio signal'
grid on
subplot(2,1,2);
Ynew = [Z;y(1:end-delay2)];
plot(t,Ynew);
xlabel 'Time'
ylabel 'Delayed Audio signal'
grid on