Difference between wordpress and PHP
WordPress is a CMS (Content Management System)
PHP is the programming language that is used in WP theme/plugin development
It depends on the nature and type of the website you have built. If you are a coding expert, then you should choose PHP as it gives you the power to change every small thing you wish for. WordPress is more suitable if you are a beginner and looking to create your website, which focuses on customer experience.
Here is my view on what to use WordPress or PHP
If your site is a smaller or simple e-commerce with few products and security is not the main priority then WordPress is the best option as you can build a WordPress site in less time and cost by using existing themes and plugins.
if you want the best performance, security and your site content are also huge. then PHP (Core Development or framework like Laravel, CodeIgniter) is a way to go where you will have full control over every part of the site. this will take a lot more time and cost compare to WordPress.