Possible causes are:
The route is unreachable, and the TCP connection cannot be established. In this case, you can run the ping command to check whether the route is reachable.
The number of users that log in to the device reaches the upper threshold. In this case, you can log in to the device through a serial interface, and then run the display users command to check whether the current VTY channels are all used.
An ACL is bound in the VTY user interface view. In this case, you can add a rule in the bound ACL to allow the user access.
The access protocol is incorrectly specified in the VTY user interface view. For example, when the protocol inbound ssh command is run in the VTY interface user view, the telnet operation will fail.