It’s impossible to answer this without more details.
Can you figure out which layer it’s complaining about? It might be a custom layer missing the .get_config/.from_config methods.
If your model can’t be loaded as a keras model (tf.keras.models.load_model) it can probably still be loaded as a saved_model with tf.saved_model.load. That doesn’t give you access to the layers, but it will let you use the reloaded model, if that’s what you’re trying to do.