Lenovo ThinkCentre M82 Intel i5 SFF Desktop

Does this have the ability to write dvd’s or just read?

Specs call out DVD-ROM, so read only.

If you need to be able to write discs, a $20 internal DVD-RW drive can be easily swapped.
https://support.lenovo.com/us/en/documents/pd023717