Don't try to start foreground applications from
made a log.text to know what's happening
You are possibly the only person I've seen take this time and confusion saving step here in the context of this very common problem -- we get at least one post a week here about this issue, most of them insisting "my script isn't being run", when of course it is, it just isn't doing what you want.
So fortunately we can skip all that and the error is straightforward, if you understand that the init system (systemd, which runs rc.local), is mostly about starting background services, meaning programs which do not need input from the keyboard or a screen to output to. Which is good, because they don't get one.
qt.qpa.screen: QXcbConnection : Could not connect to display
What that literally is about is not being able to connect to a GUI display to open a window.
If you want a GUI application to start at boot, use the LXDE autostart file, as another user suggested in comments. If you search around you will find many examples and discussions of this (there may be some nuances depending exactly what you want to do).
There is also potential confusion regarding the location of the autostart file. It looks to me from a quick search that for Raspbian/RpiOS buster (the current version), this works:
Not sure if that means it is applied to the
pi user or if this is global. If it's the latter it may replace the GUI login. If not you will have to use autologin for that user (
pi) to start the program at boot.