I handled the issue guys. I am explaning it so others may use it.
"First, Kapt has been deprecated and replaced with KSP. When adding KSP, the documentation on developers.google.com alone won't suffice. It will result in unknown reference warnings for KSP. You need to add the following lines sequentially to both build.gradle(app) and build.gradle(Project) files. However, it's crucial that the version 1.9.24-1.0.20 in build.gradle(Project) is compatible with your Kotlin version. First, determine your Kotlin version, then find the suitable version on the KSP GitHub page and adjust accordingly. Note: The version number here; 1.9.24 indicate your kotlin version, 1.0.20 indicate Ksp version.
You can check compatible kotlin-ksp versions here -> Ksp Github -> [https://github.com/google/ksp/releases][1]
plugins {//build.gradle(app)
id("com.google.devtools.ksp")
plugins {//build.gradle(Project)
id("com.google.devtools.ksp") version "1.9.24-1.0.20" apply false