The Gan-Gross-Prasad (GGP) conjecture studies a family of restriction problems for classical groups and proposes precise answers to these problems using the local and global Langlands correspondences. It also has a twisted variant in the equal-rank Fourier-Jacobi case, which is called the twisted Gan-Gross-Prasad conjecture. In this talk, motivated by the works of J.-L. Waldspurger and R. Beuzart-Plessis in Bessel models, I will introduce a local trace formula approach and how to use it to prove the twisted Gan-Gross-Prasad conjecture for tempered representations over nonarchimedean fields.