Can't access contribution page without a login
You may need to check/add necessary permission that is required to access contribution page for anonymous user.

You can check by navigating to CiviCRM >> Administrator >> Users and Permissions >> Permissions (Access Control). Click on 'Joomla Access Control'.