This warning is the result of changes in apt on newer Debian-derived distributions.
It's important to note that these deprecated functions will continue to work for the full lifetime of current distributions like Ubuntu 22.04.
In order to better secure systems that make use of third party repositories, apt now recommends installing repository keys separate from any default trusted keyring and specifying in the repository configuration which key is used to sign that repository. This helps protect systems using third party repositories by reducing the blast radius of a compromised key or misconfigured repository by allowing a system to limit the scope of that key.
The Debian wiki article on Using third party repositories expands on the new options and methods for configuring repositories.
The ROS infrastructure team is planning to provide ros-archive-keyring packages as described by that article as part of an updated key rotation strategy, which will hopefully streamline ROS installation instructions and make key rotation a seamless part of keeping ROS installations up-to-date.