What function does the swim bladder have in most bone fish?

it’s hydrostatic
The swimming bladder is filled with a mixture of oxygen, nitrogen and carbon dioxide. The ratio of gases in the swim bladder in fish varies and depends on the type of fish, habitat depth, physiological condition, etc. The buoyancy of the fish (the ratio of the density of the body of the fish to the density of water) can be neutral (0), positive or negative. In most species, buoyancy ranges from +0.03 to −0.03. With positive buoyancy, fish emerge, with neutral hover in the water column, with negative they sink.
Neutral buoyancy (or hydrostatic equilibrium) in fish is achieved:
1) using a swimming bladder;
2) watering the muscles and relieving the skeleton (in deep-sea fish);
3) the accumulation of fat (sharks, tuna, mackerel, flounder, gobies, loaches, etc.).
So, the swim bladder in most bone fish plays a hydrostatic role.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.