Graphics settings / performance inside of the material editor

Asking for help from experienced users of the material editor in Unreal Engine 5. Could you please tell me how to add to the material nodes the ability to change (material)-instance parameters or material itself depending on the graphics settings and/or its performance. For example turning on/off some of the nodes to optimize material’s performance without diving into MM and unpinning it manually. Or could you give me a link to a related post. I’ve looked through the lots of posts on the epic forum, but haven’t found what I’m looking for.

Thank you in advance!