To increase your lung capacity in GTA San Andreas: Definitive Edition, you just need to exercise it by practicing holding your breath underwater. Find any body of water deep enough to swim underwater in. Coastal spots are best, but even a lake or swimming pool will do. The important thing is that you can get in and out of the water quickly.
Jump in the water and swim downwards until your stamina meter is at 50%, then swim back up to the surface and get out of the water. On dry land, your stamina meter will refill faster than if you stay in the water. Once your stamina meter is full again, jump back in the water and repeat the process. Doing this over and over is the fastest, most efficient way to increase your lung capacity.
If you want to improve your lung capacity to unlock the Amphibious Assault mission, you only need to increase it to 20%, which shouldn’t take more than 15 minutes using this practice method. Increased lung capacity is also useful if you’re looking for oysters, some of which are hidden in deep water. If you can hold your breath for longer, then you can spend more time searching underwater.