I am Ukrainian. "цибуля" could (should) be both singular and plural. It same as "metro" or "sugar". Here is mistake about keeping only plural.
In the first sentence noun "tsybulya" is the subject, whereas in the second sentence "tsybulya" is a direct object (it takes accusative case).
the english translation is wrong цибуля is singular цибулини is plural as of right now the first sentence is supposed to be "this is an onion". The second part literally means "do you eat onion?" meaning "do you like eating an onion" since you can't say in english "do you eat onion" you say "onions" so that's correct still confusing tho so much that you misdid the first sentence it's is singular