Is the Pi (with OpenWrt) acting as a router or an AP?
If a router, you need to have a wan and a lan defined, and they must be different subnets.
If you're using the Pi as an AP, stop and reconsider -- the Pi makes a terrible wifi AP because of the very low end wifi chip and small antenna... it is not suitable as an AP.
Neither, I want to use openwrt as a dns server only
Could openwrt work as dns server to decide which ip address could access to internet and which is not? will parentel control work as a dns server only?
Also, as a dns server, I want openwrt to filter those harmful websites to kids
Yes, it could work using something like Adguard Home. However, you may be better off installing PiHole on that device for this type of purpose.
You also need to set your primary router to advertise this device as the DNS server (via DHCP)... this won't stop internet access, but obviously DNS is a good way to control internet access from a practical perspective. However, it can also be bypassed fairly easily... so you may need to setup firewall rules on your main router to prohibit the use of any other DNS servers.