Depends on the OS, but generally you should follow the documentation https://www.mongodb.com/docs/manual/reference/parameters/#mongodb-parameter-param.tcpFastOpenServer
On Linux /proc/sys/net/ipv4/tcp_fastopen is the parameter to look at (both client and server).