Usually when both the Keyboard and Trackpad fail at the same time, the problem may be with just the Trackpad or the Trackpad Flex Cable especially with the 2015 model where this problem is common. If you have a USB-C model Apple laptop, then Apple does not consider the Trackpad or Trackpad Cable to be a separate part. For the USB-C laptops the Trackpad & Trackpad Flex Cable is considered a part of the Top Case Assembly which also includes the Keyboard, Trackpad, Battery, and for some models the Touchbar and Speakers as well. The Top Case Assembly is very expensive since it includes so many other items that would normally be considered separate individual components on older models.
You can try contacting an Apple Authorized Service Provider to see if they may be able to swap out a Trackpad from one of the Top Case Assemblies to see if that is enough to fix the laptop, although you would be receiving a used part. An independent repair shop unaffiliated with Apple may also be able to acquire a used Trackpad online. Depending on the exact model of the Mac, this could be a problem since 2018+ models use a T2 security chip where all the part serial numbers are associated with the T2 security chip. If an item is using an unknown part serial number on a 2018+ Mac, then your laptop's security level may be considered compromised or unacceptable for certain features (such as streaming video content, Apple Pay, etc.). This also applies even to an AASP unfortunately due to how Apple restricts programming the T2 security chip.
However, since you did not mention which part Apple intends to replace, I may be wrong and the problem may be with the Logic Board or possibly the Keyboard itself. An Apple Store seems to only do the most basic checks, while an AASP may perform a more thorough troubleshooting, but an AASP is still limited by only having access to just three main components for the USB-C laptops which are the Display Assembly (LCD, Camera), Logic Board (CPU, GPU, memory, SSD, WiFi), and Top Case Assembly (Palmrest, Keyboard, Trackpad, Touchbar, Battery, Speakers). As you can imagine having so many items on a single component greatly increases the cost of that component versus having each of those smaller items as their own separate replaceable component. Apple has apparently decided people who pay lots of money for an expensive laptop can afford to pay for an expensive repair or perhaps never gave repairs any thought during the design process.
Depending on what is bad, the problem may get worse over time to the point you may not be able to boot the Mac or access the data on the SSD. Make sure to have good backups. If you don't have Mac with the same OS or newer, then you may want to have a backup of the files on external media that can be accessed from any device or OS (even non-Apple OS).
You should always have frequent and regular backups of your computer and any external media which contains important & unique data.