Yes, but in moderation and with attention to the method
Hamsters can eat apples, but the following points need to be noted:

Feed in Moderation
Apples are rich in vitamins, minerals, and dietary fiber, which are beneficial to the health of hamsters. However, excessive consumption may lead to gastrointestinal discomfort, diarrhea, or even gastroenteritis. It is recommended that each feeding amount should not exceed one-eighth of an apple, or approximately 5% of the hamster's body weight.
Remove Apple Seeds and Cores
Apple seeds and cores contain cyanide, and if hamsters consume them, they may be poisoned, and in severe cases, it can even lead to death. Therefore, before feeding, the apple must be peeled, seeded, and cut into small pieces.
Choose Fresh Apples
The apples for feeding should be fresh and free of rot to avoid health problems caused by spoiled food.
Observe the Hamster's Reaction
When feeding an apple to a hamster for the first time, it is advisable to give the hamster a small piece first and observe its reaction. If symptoms such as diarrhea, vomiting, or loss of appetite occur, stop feeding immediately and consult a veterinarian.
Alternative Option: Dried Apples
If you are worried that the excessive water content of fresh apples may cause diarrhea, you can make the apples into dried apples as a snack. This can not only retain the nutrients but also reduce the water intake.
Conclusion: Apples can be used as a supplementary food for hamsters, but the feeding amount needs to be strictly controlled, and it is necessary to ensure that the seeds and cores are removed. At the same time, pay attention to observing the hamster's reaction to ensure its health and safety.