Sit down with a nice cup of tea and study how TFT_eSPI works.
e.g. a pre-cooked Setup file
e.g. a custom User_Setup file
That is all there is to it. i.e. configure the Setup to suit your display and your target. Every sketch will work without any edits.
Change your display, Select the appropriate Setup file.
Other libraries work in different ways.
U8g2 requires you to change the constructor in every example sketch.
MCUFRIEND_kbv requires you to write/use a SPECIAL for anything other than common controllers on standard shields.
David.