How can I change the shaders that materials use when switching build targets

Sorry if this isn’t the right forum.

I want to know how can I have shaders on materials change when I change build targets.

For instance, if I switch to the Android build target, materials will use the Simple Lit shader.
Then, if I switch back to the Standalone build target, materials will use the Lit shader.

Using URP.
Unity 2022.3.20f1

Not sure if there is a direct callback, but you should be able to use on compile. I think this was [InitializeOnLoad]
Then in this check which build target you use and if it is different switch the materials.

You can also do it on build callbacks if you want to do it on the build process instead

I guess I can try that.
Thanks!