A Linux box that takes long to boot is annoying, and guessing which service is guilty is a waste of time. systemd measures it for you.
systemd-analyze blame
The output is a list of units with the time each one needed to start, longest first. A line like 12.4s docker.service tells you where the seconds went. The command works on a normal user account and reads data from the boot that just happened.
Run plain systemd-analyze first for the total: it splits boot time into firmware, loader, kernel and userspace.
A long time in blame does not always mean that service held the boot up. A unit can take ten seconds while other things keep starting beside it. To see the chain that really delayed things, use:
systemd-analyze critical-chain
That prints the tree of units that boot had to wait for, with the times behind them. If a network wait service shows up near the top on a server, that is often a hint to look at your network configuration, not at the service itself.
The numbers are only for the last boot. Reboot and run it again to see whether a change helped.
Further reading: systemd-analyze manual (freedesktop.org)