Use grouping of results and processing them using GROUP_CONCAT:
SELECT Goods.id, Goods.titile, Goods.description, Goods.price, GROUP_CONCAT(Availability.size, ":", Availability.count, "\n") available FROM Goods JOIN Availability ON Availability.goodsId = Goods.id GROUP BY Goods.id;
In the available column you will have the sizes and quantity through ":", and the transition to the new line will act as a separator between the sizes.
You can also use a query that will return several results of the same variant (in the case of several sizes) and you will need to group the data by id directly by the recipient in an associative array.
SELECT Goods.id, Goods.titile, Goods.description, Goods.price, Availability.size,Availability.count FROM Goods JOIN Availability ON Availability.goodsId = Goods.id