Yes, you can do that. Strapi is nodejs based though, and so requires its own nodejs instance on the server.
Personally I have a DO droplet running ubuntu and pm2, and serve strapi from api.domain.com while the frontend lives on domain.com. You can spin up your apps exactly like you do on localhost (npm start etc) and then use NGINX as a reverse proxy.
Here is a good guide if you are looking to do the same. Strapi also has a guide.
edit: I missed your question. Strapi is a headless cms, yes. It doesn’t render its own frontend. Instead you can build whatever frontend you want, and consume content from strapi via the rest or graphql api. But you can still host them both on the same server if you want.