While some fuel volume sensors use ultrasonic measurements this answer to How is fuel mass measured in airliners? says:
The FCOM lists the sensors involved in this measurement:
The FQI system comprises : [...]
- A set of capacitance probes in each tank to measure fuel level and temperature.
- one densitometer (cadensicon) sensor in each wing inner tank permitting the calculation of the fuel quantity.
- one Capacitance Index Compensator (CIC) in each inner tank giving the dielectric constant of the fuel in case of cadensicon failure.
(Airbus A320 FCOM - Fuel Description - Fuel Quantity Indication and Level Sensing)
Using the densitometer (or the backup CIC), the conversion from volume to mass is performed by the FQIC. The ECAM can then display fuel temperature and mass as calculated by the FQIC.
(Airbus Safety First - Fuel monitoring on A320 Family aircraft)
So in this case capacitive sensors (plus fixed tank shape) can determine the fuel volume, and a density measurement can convert that to a mass.
Question: How does a fuel density sensor work, being the "densitometer" or "cadensicon" mentioned in the block quote.