Some programs take 30 seconds to launch, but are temporarily ok at beginning of session

After a short period of time, the app launcher and panel take ages to launch certain apps. Some applications are fine, others take 30 seconds to launch. Logging out and logging in again temporarily fixes it but then it will go back to being slow again. Terminal seems to launch them instantly when I run the command to do so but that is not a solution for me. Same on X11 and Wayland

Here are some of the apps that have the slow-down:

-VLC
-LibreOffice
-Telegram
-Thunderbird
-Joplin