We don't have a stable interface for custom lighting in URP, so this can change from time to time. Have a look at how the URP BRDF is implemented in the link below. Important parts are using the LIGHT_LOOP_* macros instead of a raw loop, and making sure the _FORWARD_PLUS multi-compile is in your shader.
https://github.com/Unity-Technologies/Graphics/blob/f56d2b265eb9e01b0376623e909f98c88bc60662/Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl#L314
https://github.com/Unity-Technologies/Graphics/blob/f56d2b265eb9e01b0376623e909f98c88bc60662/Packages/com.unity.render-pipelines.universal/Shaders/Lit.shader#L147