Certificates and keys validity

I'm connecting to a server via TLS. My device has installed server cert, device cert, private key and public key.

I read here validity SSL/TLS that TLS cert will last max 2 years.

This means that every 2 years I will have to updat all the certs stored into my device? Only server cert and device cert? Do I have to update also public and private key?

If you make your certificate yourself you can specify how long they are valid. You can specify they last 20 years although that usually doesn't make that much sense because in 10 years the encryption technology used today is probably not secure anymore.