unfortunately theres no easy or straightforward way to do so. the profiler is the best tool in godot for looking into what if affecting your gpu’s performance, but the way it does this is by measuring the time it takes for the rendering engine to complete each “pass” each step in the process it needs to take, and your shader isnt a pass in itself, its more like a way to bind instructions and give data for what needs to happen at specific passes.
the good news is that if nothing in your scene is doing anything with a specific pass (say, subsurface scarrterirng, or volumetric fog), then that pass wont appear in the profiler. so what you can do is create a minimum viable scene to render, turn off environment and sky and hide all the meshes, and then measure the profile of that, then do the same for the exact same scene but with an object with your shader in frame. you can compare what passes werent there before, and you can measure the difference in passes that were there.
This is all pretty time consuming, and not to mention that the effects on performance your shader has can vary pretty drastically depending on a few things. for example, if youre using a fragment, light, or fog shader, then its impact is measure per pixel, so the impact on performance that your shader has can change drastically depending on hor near or far away it is.
Its much easier to try and learn why some technniques with shaders are less efficient than others. for example if you’re reading data from a texture and you move your UV around multiple times to sample multiple parts of the texture from all over the place, that can be super inefficient (reading data from memory in a shader is a slow process, especially if youre reading from places in memory that arent close to each other). its also worth learning about draw calls and the impact that can have, which isnt really about how to write shaders, but more about how you use them. if youre worried about wether youre using too many shaders, well, every shader is another draw call (times the number of meshes that are using that shader!)
its not worth getting too worried though, but if youre running into performance issues down the line this is the sort of thing you should consider.