First make sure you can sell resources, you’ll require the marketplace construction in the castle.
But if you buy marketplace in elf and switch to knight , you won’t be able to sell.
You’ll need to buy marketplace for the castle you are playing as currently to be able to sell.
Also if you have the marketplace already,
Go to market , in bottom left above refresh button you’ll see the button “post a lot”, click that, choose the resource you want to sell and how many. And for how much time the offer will stand in the market.
Again, if you don’t Have the marketplace it will be visible that you don’t have it