Nissan Altima, a part is hanging. How can I get it back?

Hello,
what is this part, and how can I get it back? Sorry, I can put only one image by the forum rules.
Thanks

Here is another image.

Is it plastic or metal?

Either way, whether or not you can put it back on yourself depends on your skill and tools. Look underneath and see if you can figure out where it goes. Put a screw in that hole and into the spot where it goes, have lunch.

Can’t reach the spot where the screw goes? Get your jack and jackstands and raise the car, put in the screw, have lunch.

Don’t have a jack or jackstands? Take it to an independent local mechanic (not a chain store) and ask them to fix it. Pay them so they can have lunch.