To be able to use previous 20 samples to classify the current sample you can use LSTM layer: tf.keras.layers.LSTM  |  TensorFlow Core v2.7.0 1
LSTM goes first after the input layer - it could be a single layer or a stack of several layers.
You should reshape the data before passing it to the model, so than each sample is 2-dimensionsl and has the shape [20,  10].