Your question is very broad; I will try to guide you, but you will have to give more information, or the code you had in your functional version (last version where cron worked for you)
The best answer I can give you to your question is to compare your code with another module's cron.
For example:
a module external to Odoo that has a cron, it can be sendcloud.
It is included in version 17, but in versions 15 and 16 you can still download it from
https://apps.odoo.com/apps/modules/15.0/delivery_sendcloud_official/
Within this shipping module, you will find that the shipping methods are synchronized every 1 hour (in your code you can modify it to once a day)
and you can make a call to the method so that it performs the relevant validations with the python code according to your preferences.
This is the cron file
custom-addons/delivery_sendcloud_official/delivery_sendcloud_official/data/delivery_sendcloud_cron.xml
<record id="ir_cron_delivery_sendcloud_shipping_method" forcecreate="True" model="ir.cron">
<field name="name">Sendcloud: sync Shipping Methods</field>
<field name="active" eval="True" />
<field name="user_id" ref="base.user_root" />
<field name="interval_number">1</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="model_delivery_carrier" />
<field name="state">code</field>
<field name="code">model.sendcloud_sync_shipping_method()</field>
</record>
Documentation ir.cron ACTION Odoo 15