Well, where in your L_model_forward function is the variable W defined? The error message seems pretty clear and it gives you something very definite to investigate.
Notice that the W^{[l]} and b^{[l]} values for all the layers are contained in a python dictionary called parameters, right? So part of the logic you need to write here is to extract the correct values from that dictionary for the layer that you are currently processing. You should already be familiar with how to deal with the dictionary from the earlier routines that you have written, e.g. the initialize routines.
But that is in a completely different function, right? Are you familiar with the way variable “scope” works in python? But that is an example that should illuminate what you need to be writing in L_model_forward: note that ‘W’ is a string in that line of code, right? It’s being used to construct a “key” for the python dictionary.
What do you mean “recall”? You need to write code that uses the “key” values for the parameters dictionary to extract the particular values you need.
This is not a beginning python course: you are already expected to have solid familiarity with how python works as a prerequisite before you start here. If this is the type of issue you are having difficulty with, it might be worth considering taking a python course first.