If you use Wayland and in taskbar TB has an ugly W icon, you can try
- to check if the path of icon is correct;
- add this line (or something similar) in tb .desktop file:
StartupWMClass=thunderbird-esr. Instead of thunderbird-esr you could have to check the appropiate name of TB in yout system. - be sure that the name of your desktop file be capitalized, that is Thunderbird.desktop and not thunderbird.desktop;
- be sure that you don’t have duplicate Thunderbird entries (i.g. in KDE menu or in .desktop files)