For initial SQM setup see this page: https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm
setup cake and layer_cake
Use custom firewall rules to set desired DSCP marks. There are more threads about this but this one shows info on how to check if everything is working properly: Checking DSCP tags