To use the weights from model1 in model2 with Tensorflow 2.18:
model2 = Sequential()
model2.add(Conv2D(10,kernel_size=(3, 3), activation="sigmoid",
input_shape=(28, 28, 1)))
The weights should be set after the layer is created
model2.set_weights(model1.layers[0].get_weights())