HTTP/3 is the successor to HTTP/2 and brings some improvements. However, it is not as if HTTP/3 completely replaces HTTP/2. Both protocols have their advantages and disadvantages and are used depending on the requirements and infrastructure of the respective web project.
However, HTTP/3 is expected to be more widely used than HTTP/2 in the future as it is seen as more future-proof due to improvements in data transmission and latency reduction. Most modern browsers already support HTTP/3, although it's not fully standardized yet.