This means Lemmy container is up and running, but there is some error on the backend that prevents it from functioning correctly. A pretty wild guess, but it’s probably something with the database.
docker compose logs may tell a bit more about what’s going on. Check out this page join-lemmy.org/docs/…/troubleshooting.html (just remember to replace docker-compose with docker compose - again, I specifically recommend to uninstall docker-compose so it won’t accidentally mess things up).
If it’s not something obvious, one thing you may try is tear everything down (docker compose down -v), change lemmy:latest to lemmy:0.18.1 in your Compose file, and try starting again. This will use explicit version number and it may help if the latest tag is not something we expect it to be. E.g. I had issues spinning up clean 0.17.4 - it had a bug in DB migrations that was supposed to be fixed in 0.18.