Hi @sunnymorning,
I hope you are well today and thank you for your question.
You have to develop custom code to achieve this. Please refer the following posts for similar answers.
https://colorlibsupport.com/t/integrate-first-two-entries-into-the-grid/
https://colorlibsupport.com/t/post-grid-on-hompage/
Best Regards,
Movin