I used to do it with Coc.nvim
:CocCommand clangd.switchSourceHeader
But now I have moved to built-in nvim lsp and haven't any idea how to the same.
I found this solution for coc, but still dont how to do this for nvim lsp.
execute 'edit' CocRequest('clangd', 'textDocument/switchSourceHeader', {'uri': 'file://'.expand("%:p")})
When using the built-in LSP client, I recommend using the nvim-lspconfig plugin for configuring the servers. For clangd, it creates a command :ClangdSwitchSourceHeader
(see documentation).