Why did God create apple which caused Adam and Eve sin when they ate it?

God did not create anything for us to sin, everything God create is for our good

Genesis 1:31 And God saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day.

This Bible verse Was written by Moses and after thousands of years, the scripture was confirmed by Apostle Paul 1 Timothy 4:4 "For every creature of God is good, and nothing to be refused, if it be received with thanksgiving:"

It is Biblical verse that everything God create is good and it is good for all of us, the only thing which is wrong and bad is the improper use of all these things that God created. For example; Marijuana is substance that is good, it relieves pains, headache etc but it is use in an improper way that will destroy your value

Apple 🍎 was created by God but is is not the Apple that cause the sin of Adam.

Genesis 2:16-17 And the LORD God commanded the man, saying, Of every tree of the garden thou mayest freely eat:
But of the tree of the knowledge of good and evil, thou shalt not eat of it: for in the day that thou eatest thereof thou shalt surely die.

The fruit of that tree is not Apple tree, it is called the tree of knowledge of good and evil.

Apple is forbidden by God for man to eat, it is the tree in the midst of the garden called the tree of knowledge of good evil. That is the only tree that was prohibited by God for Adam, everything in the garden can be eaten, there is no poisonous tree in the garden but Adam transgres

For example; as we have everything we can eat in the world, if you are a doctor and you have patient, not everything can be eaten for your patient, you would prescribe what your patient can eat. God knows what is good for Adam Maybe the fruit cause harm in the heart of Adam that is why he is prohibited from eating it

Adam was persuaded by his wife; Eve, Eve was tempted by serpent to eat from the fruit of the knowledge and evil. It was Even that Satan use for Adam to transgres God

1 John 3:4 Whosoever committeth sin transgresseth also the law: for sin is the transgression of the law.

Adam sinned because he transgres God. It is not the Apple that cause Adam's sin against God, it is the transgression of the law of God

Bible verses source