The user @beeshyams, answered correctly, in the comments. However, this person did not want to answer, directly.
Here's the answer:
ADB will not backup a lot of things.
TWRP will backup all apps and data except
/data/media
unless you use this or Magisk module "TWRP helper".
TWRP is far more reliable in backing up than using adb to backup.
TWRP will also backup apps and their config. Have a look at our nandroid tag, it's questions and read the tag wiki.
Back up all partitions. It's while restoring you may skip partitions depending on what you are trying to do.
I wouldn't do ADB because: a) it won't backup everything; b) I don't know much about it; C) why bother when there is a proven solution in my view?
UPDATES
- @alecxs says:
It's better to keep one single partition per backup.ab file because some older TWRP have issues with restoring.