To make such a URL, you can use a design pattern called Front Controller, where all requests from your site will be managed by index.php
Example of how URLs with front-controller are:
seusite.com/categorias
seusite.com/categoria/1
seusite.com/categoria/create
Understanding the concept and applying to your project would look like this. When a request hits your index.php (example: yourite.com/ProfileName) your index will search your database if that username exists. If it exists it brings the view with the user information.
It's very simple to build a Front Controller in a pure PHP project, but an alternative is to work with a PHP framework that already has at its core this design pattern and many others that facilitate the development of applications, always following the best practices. I'll leave the link for some case you are interested.
Hugs!