But they are not directly elected to ministerial positions.
In a parliamentary system (ie most countries in the EU) members of parliament are elected. Parliament appoints a premier. Premier appoints ministers with parliamentary approval.
EU commissioners are nominated by the member states subject to their own laws. Typically that means they are chosen by your elected government.
If you want a directly elected commissioner that’s a matter of national politics. Your country is free to change its laws to select a commission nominee via a national vote.