Hi @karthickdeveloperwp you can try the PHP code to see if it still works, you could be right about needing a different kind of function to get the results you want to achieve. This is all depends on the post type you want to create.
However, with this theme, you can create templates for different post types in the way you want without code. You have the ability to change how things look on any page by using the Editor and its Templates.
For example, there is the Query Loop block which you can use to display any kind of post, you can filter the posts that are displayed and you can even change how the posts are displayed within the loop using blocks. This is quite popular in creating Portfolios.
Additionally, on www.remarpro.com Patterns folks have shared patterns you can also use as templates for your site.