Waveshare library (1.8" LCD) is so weird

I have shared an example code of the LCD library from Waveshare in the comments above.
I'm still reviewing it, but I can't find the cause due to my lack of coding skills in C or C++.