Thanks for posting this query.
I'm Ankush and I'll attempt my best to help you out.
There 'is' a feature through which you can let your users stop entering the 2FA code for a specified number of days.
After enabling this feature, the user's device will become trusted.
You can enable it through Entra Admin Center.
Scroll to bottom and find the option,
Please view the link for more info,
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.