The fact that apps launch faster through Spotlight (⌘ Space) than from the Dock is a useful observation.
It indicates that the apps can launch more quickly when started through Spotlight. Apple confirms that the Dock and Spotlight provide separate ways to open apps. (Apple Support)
First, restart the Mac and check System Settings → General → Software Update to make sure macOS 27 is fully up to date.
Apple recommends macOS 27 updates for stability, performance, and compatibility. (Apple Support)
Then test the same app from the Dock, Spotlight, and Finder >> Applications.
Note whether the delay occurs only from the Dock or also from Finder, and whether it affects all apps or only particular apps.
If an affected app is shown as running in the background, you can Control-click its Dock icon and choose Stop Running in Background as a test.
Apple notes that background activity might affect Mac performance.
You can also review System Settings → General → Login Items & Extensions → Background App Activity. (Apple Support)
If the delay occurs, open Activity Monitor and check the CPU and Memory tabs while the problem is occurring. This can show whether a process is using unusually high CPU or memory at the time of the delay. (Apple Support)
I would not rebuild the Spotlight index at this stage because Spotlight is already launching the apps quickly.
If the problem continues, note approximately how long the Dock delay lasts and whether it occurs with all Dock apps or only specific apps. Those observations, together with what Activity Monitor shows during the delay, will help determine the appropriate next step.
Does the current is directly relate to this other issue ?
And if so, how ?
Mac is running slow - Apple Community