Yes, your CSS and JS would break, as the links to those would also be redirected to the index page and so the CSS or JS wouldn’t be served.
You seem to want to prevent 404 errors when someone visits a path that doesn’t exist. Is that correct? If so, I don’t see any reason to do that, better to create a helpful 404 page on your origin to help users find their way (and instruct bots and crawlers not to bother with that page again).
If you really want to do this, then you can trap the 404 on your origin, and then redirect is probably the easiest way. If you want to do it on Cloudflare, you’ll need to create a redirect rule that lists all the valid paths first, then redirect if none match. A lot of work if you have more than a handful of pages or things change.