One can enable Magento 2 profiler to analyze the performance problems on the server-side.
However, once the speed check is done, one needs to disable Magento 2 profiler so that the frontend users are not bothered.
Make sure you do not affect the user experience by disabling the Magento 2 profiler using the method at https://meetanshi.com/blog/disable-magento-2-profiler/