I'm assuming you have a fresh, vanilla installation of Ubuntu 22.10 with only the base operating system.
First, lets install Apache, MySQL, and PHP, if not already installed. This can be achieved with a one-line command:
sudo apt-get install apache2 mysql-server php libapache2-mod-php phpmyadmin
Start the Apache2 and MySQL service:
sudo systemctl start apache2 mysql
Run the MySQL security script:
sudo mysql_secure_installation
Test the Apache installation by navigating to http://<ip_address> in your web browser, and you should see a default web page.
Create a test PHP file in the Apache web root directory:
sudo nano /var/www/html/info.php
Add the following code to the file:
<?php
phpinfo();
?>
Test the PHP installation is functioning correct by navigating to http://<ip_address>/info.php in your web browser.
Test that you can access the phpMyAdmin login page by navigating to the following address:
http://<ip_address>/phpmyadmin/
That's about it. Type in your MySQL username and password and you should be logged into phpMyAdmin.
While there are a ton of other configuration options for all of the three software packages we've just installed, I'm going to stop here as it can get quite involved with a myriad of options available.
If you want to set up individual aspects of each package, such as securing your connections with security certificates and installing additional PHP modules, enabling virtual hosting and configuration, have a look at some of the other tutorials.
If you can't browse to your web server you may need to open ports in your firewall.