Can kodi media server be installed on the router

https://kodi.tv/
I do not know how but i believe it can
dlna seiver

Both for security and performance, you're likely a lot better off with a multi-core box that has non-flash file systems and potentially hardware acceleration for video compression. Even a Raspberry Pi-class box, for example, is likely to be a lot more suitable than is a purpose-built router.

There is a DLNA server available: https://openwrt.org/packages/pkgdata/minidlna

I'm not sure what you mean by "Kodi media server." That Kodi requires a computer monitor and graphics card.

Setting your PC up as a Kodi UPnP server can give your entire home network access to the movies contained within it. This can allow you to stream its movies to your television through an Amazon Fire Stick or play them on any mobile device that is connected to your wi-fi.