I hope you are well today and thank you for your question.
To achieve this please see the answers posted in the following topics for the similar questions.
https://colorlibsupport.com/t/about-popular-post/
https://colorlibsupport.com/t/can-we-add-thumbnail-pics-to-recent-posts-widget/
Best Regards,
Movin