Hello Jozanna,
Welcome to Apple Support Communities!
We see that you are trying to delete a text of a shared location and it will not let you.
We’d be happy to help!
Are you trying to delete the message sent that shows a map of your location? If so, make sure you tap on the little circle to the left of that message to select it, and you should then be able to select the trash icon. Please note the text that appears in the thread that shows the time and date of when you started and/or stopped sharing your location can't be deleted unless you delete the entire text thread between you and that contact.
If you are trying to delete the text that shows a map of your location, and you have already followed the steps in Use Messages on your iPhone, iPad, or iPod touch to delete the message and the trash icon greyed out, you may need to follow the steps in If an app on your iPhone or iPad stops responding, closes unexpectedly, or won’t open. The article name might not look like it applies, but the steps apply to the issue you’re having with the Messages app.
Have a great day!