Yes, the link that I put is the actual search form that is working. I added it to my webpage with the AWS widget and the Elementor plugin.
But now I’m making my own theme from zero, so I want to add the same searchform in my .php page. I tried using the php code that I put in my original message but doing this is not working. The search form is well shown but not working, when I write something in it the result box is not showing. I can’t actually show you this page where my search form is not working because I’m making it offline, but it’s basically the exact same page exept that the searchform is not returning any results.