Show webscrape data on wordpress website

Latest wordpress version, twentytwentytwo theme with block editor. I want to show packages from pub,dev website on my websites when someone searches them on my wordpress website. I saw a video about it and it says that I need to edit the php of the page that I want to create but pages are stored in the database instead of php in the wordpress directory

​

So I decided to create a shortcode for the scraping and put it in my functions.php. Do I need to save the full code there? Is this the correct way of doing this?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer